Skip to content
0

katanakit-js / IAiService

Interface: IAiService ​

Defined in: src/types/index.ts:883

Contract of the AI/agent facade.

Methods ​

useChat() ​

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

Defined in: src/types/index.ts:885

Parameters ​

ParameterType
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

Returns ​

Promise<AiResult<string>>


useInitAgent() ​

ts
useInitAgent(config): void;

Defined in: src/types/index.ts:884

Parameters ​

ParameterType
configPartial<AiProviderConfig>

Returns ​

void


useRunAgent() ​

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

Defined in: src/types/index.ts:886

Parameters ​

ParameterType
goalstring
options?AgentRunOptions

Returns ​

Promise<AgentResult>

Released under the MIT License.