UNPKG

@stll/folio-agents

Version:

Framework-neutral LLM tool layer over folio's ai-edits engine: function-calling tools so an agent can read and mutate .docx documents through @stll/folio-core.

20 lines • 876 B
import { FolioAgentToolDefinition } from "./types.js"; /** Anthropic Messages API tool-definition shape (`input_schema`, snake_case). */ export type AnthropicToolDefinition = { name: string; description: string; input_schema: Record<string, unknown>; }; /** Map folio's provider-neutral tool definitions onto Anthropic's tool shape. */ export declare const toAnthropicTools: (definitions: FolioAgentToolDefinition[]) => AnthropicToolDefinition[]; /** OpenAI Chat Completions / Responses API function-tool shape. */ export type OpenAIToolDefinition = { type: "function"; function: { name: string; description: string; parameters: Record<string, unknown>; }; }; /** Map folio's provider-neutral tool definitions onto OpenAI's function-tool shape. */ export declare const toOpenAITools: (definitions: FolioAgentToolDefinition[]) => OpenAIToolDefinition[];