Skip to content

IAiService

katanakit-js / IAiService

Defined in: types/core/ai.ts:82

Contract of the AI/agent facade.

useChat(messages, options?): Promise<AiResult<string>>;

Defined in: types/core/ai.ts:84

Parameter Type
messages { content: string | null; name?: string; role: "system" | "user" | "assistant" | "tool"; tool_call_id?: string; tool_calls?: { function: { arguments: string; name: string; }; id: string; type: "function"; }[]; }[]
options? AiChatOptions

Promise<AiResult<string>>


useInitAgent(config): void;

Defined in: types/core/ai.ts:83

Parameter Type
config Partial<AiProviderConfig>

void


useRunAgent(goal, options?): Promise<AgentResult>;

Defined in: types/core/ai.ts:85

Parameter Type
goal string
options? AgentRunOptions

Promise<AgentResult>