/* * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. */ import { llmResponsesGet } from "../../funcs/llmResponsesGet.js"; import * as operations from "../../models/operations/index.js"; import { formatResult, ToolDefinition } from "../tools.js"; const args = { request: operations.GetResponseRequest$inboundSchema, }; export const tool$llmResponsesGet: ToolDefinition = { name: "llm-responses-get", description: `Retrieve response by ID with status and results Retrieves a previously created agent response by its unique ID. When stream=true, returns Server-Sent Events for real-time updates on in-progress background responses.`, args, tool: async (client, args, ctx) => { const [result, apiCall] = await llmResponsesGet( 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); }, };