/* * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. */ import { responsesCreate } from "../../funcs/responsesCreate.js"; import * as components from "../../models/components/index.js"; import { formatResult, ToolDefinition } from "../tools.js"; const args = { request: components.RequestT$inboundSchema, }; export const tool$responsesCreate: ToolDefinition = { name: "responses-create", description: `Create Response Create a response. This will generate an LLM or agentic response. At this time the only supported model is \`deep-search\`. Responses may be streamed or returned synchronously. The \`retrieve\` tool is currently the only supported tool, more tools will be added in the future. A single partition may be provided in the retrieve tool. If omitted the \`default\` partition is used.`, args, tool: async (client, args, ctx) => { const [result, apiCall] = await responsesCreate( 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); }, };