28 lines
864 B
TypeScript
28 lines
864 B
TypeScript
/**
|
|
* OpenAI Chat Completions-compatible backend (DeepSeek, etc.).
|
|
*
|
|
* DeepSeek: base URL + `/chat/completions`, Bearer key — see
|
|
* https://api-docs.deepseek.com/
|
|
*
|
|
* Tool schemas in Vibn are authored for Gemini (uppercase type enums).
|
|
* We normalize them to JSON Schema before sending.
|
|
*/
|
|
import type { ChatMessage, ToolCall, ToolDefinition } from "./gemini-chat";
|
|
/**
|
|
* Non-streaming chat + tool calls — mirrors {@link callGeminiChat} return shape.
|
|
*/
|
|
export declare function callOpenAiCompatibleChat(opts: {
|
|
systemPrompt: string;
|
|
messages: ChatMessage[];
|
|
tools?: ToolDefinition[];
|
|
temperature?: number;
|
|
/** Unused for OpenAI-compat; kept for call-site symmetry */
|
|
includeThoughts?: boolean;
|
|
}): Promise<{
|
|
text: string;
|
|
thoughts: string;
|
|
toolCalls: ToolCall[];
|
|
finishReason?: string;
|
|
error?: string;
|
|
}>;
|