/** * @license * Copyright 2026 Steven Roussey * SPDX-License-Identifier: Apache-2.0 */ import type { ToolCallingTaskInput } from "./ToolCallingTask"; export interface OpenAICompatMessage { role: string; content: string | null | Array<{ type: string; [key: string]: unknown; }>; tool_calls?: Array<{ id: string; type: "function"; function: { name: string; arguments: string; }; }>; tool_call_id?: string; } /** * Converts ToolCallingTaskInput to OpenAI-compatible message format. * Used by OpenAI and HuggingFace Inference providers. * * Multi-turn capable: preserves full tool call metadata across turns. */ export declare function toOpenAIMessages(input: ToolCallingTaskInput): OpenAICompatMessage[]; export interface TextFlatMessage { role: string; content: string; } /** * Converts ToolCallingTaskInput to a simplified text-only message format. * Used by providers that don't natively support structured multi-turn * tool calling (Ollama, HuggingFace Transformers). * * NOTE: This format discards tool_use blocks from assistant messages. * The LLM will not see what tools it previously called. Multi-turn tool * calling will have degraded quality on these providers. */ export declare function toTextFlatMessages(input: ToolCallingTaskInput): TextFlatMessage[]; //# sourceMappingURL=MessageConversion.d.ts.map