/* * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. */ import { llmFeedbackExportResponseFeedback } from "../../funcs/llmFeedbackExportResponseFeedback.js"; import * as operations from "../../models/operations/index.js"; import { formatResult, ToolDefinition } from "../tools.js"; const args = { request: operations.ExportResponseFeedbackRequest$inboundSchema, }; export const tool$llmFeedbackExportResponseFeedback: ToolDefinition< typeof args > = { name: "llm-feedback-export-response-feedback", description: `Export response feedback as CSV Synchronously exports the response feedback entries visible to the caller as a CSV file, ordered by the creation date of the underlying request. Visibility matches the list endpoint: callers see their own feedback; org owners and admins see their whole team. Supports filtering by rating. The export is capped at 50,000 rows; when the cap is hit the response carries an X-Export-Truncated header and older rows (with the default descending order) are omitted.`, args, tool: async (client, args, ctx) => { const [result, apiCall] = await llmFeedbackExportResponseFeedback( client, args.request, { fetchOptions: { signal: ctx.signal } }, ).$inspect(); if (!result.ok) { return { content: [{ type: "text", text: result.error.message }], isError: true, }; } const value = result.value.result; return formatResult(value, apiCall); }, };