/* * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. */ import { llmFeedbackExportCompletionFeedback } from "../../funcs/llmFeedbackExportCompletionFeedback.js"; import * as operations from "../../models/operations/index.js"; import { formatResult, ToolDefinition } from "../tools.js"; const args = { request: operations.ExportCompletionFeedbackRequest$inboundSchema, }; export const tool$llmFeedbackExportCompletionFeedback: ToolDefinition< typeof args > = { name: "llm-feedback-export-completion-feedback", description: `Export completion feedback as CSV Synchronously exports the completion 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 llmFeedbackExportCompletionFeedback( 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); }, };