/* * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. */ import { llmResponsesCreate } from "../../funcs/llmResponsesCreate.js"; import * as operations from "../../models/operations/index.js"; import { formatResult, ToolDefinition } from "../tools.js"; const args = { request: operations.CreateResponseRequest$inboundSchema, }; export const tool$llmResponsesCreate: ToolDefinition = { name: "llm-responses-create", description: `Create an agent-powered response with tool support Creates a new AI agent response using advanced language models with autonomous tool usage capabilities.`, args, tool: async (client, args, ctx) => { const [result, apiCall] = await llmResponsesCreate( 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); }, };