/* * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. */ import { llmFeedbackListCompletionFeedback } from "../../funcs/llmFeedbackListCompletionFeedback.js"; import * as operations from "../../models/operations/index.js"; import { formatResult, ToolDefinition } from "../tools.js"; const args = { request: operations.ListCompletionFeedbackRequest$inboundSchema, }; export const tool$llmFeedbackListCompletionFeedback: ToolDefinition< typeof args > = { name: "llm-feedback-list-completion-feedback", description: `List chat completion feedback Retrieves a paginated list of feedback entries recorded on the caller's chat completions, ordered by the completion's creation date. Supports filtering by rating. An \`after\` cursor that no longer resolves to a completion visible to the caller returns 400; restart pagination from the first page.`, args, tool: async (client, args, ctx) => { const [result, apiCall] = await llmFeedbackListCompletionFeedback( 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; return formatResult(value, apiCall); }, };