/* * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. */ import { llmBatchesCreate } from "../../funcs/llmBatchesCreate.js"; import * as operations from "../../models/operations/index.js"; import { formatResult, ToolDefinition } from "../tools.js"; const args = { request: operations.CreateBatchRequest$inboundSchema, }; export const tool$llmBatchesCreate: ToolDefinition = { name: "llm-batches-create", description: `Create a batch Creates and executes a batch from an uploaded JSONL file of requests. Each line must have custom_id, method, url, and body fields.`, args, tool: async (client, args, ctx) => { const [result, apiCall] = await llmBatchesCreate( 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); }, };