Skip to content

IAssistantService

katanakit-js / IAssistantService

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

Contract of the assistant facade.

useCreateSession(channel?): Promise<string>;

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

Parameter Type
channel? string

Promise<string>


useGetHistory(sessionId): Promise<{
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";
}[];
}[]>;

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

Parameter Type
sessionId string

Promise<{ 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"; }[]; }[]>


useInitAssistant(config?): void;

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

Parameter Type
config? AssistantInitConfig

void


useReply(
sessionId,
text,
options?
): Promise<AssistantResult>;

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

Parameter Type
sessionId string | undefined
text string
options? AssistantReplyOptions

Promise<AssistantResult>


useResetSession(sessionId): Promise<void>;

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

Parameter Type
sessionId string

Promise<void>


useSessionExists(sessionId): Promise<boolean>;

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

Parameter Type
sessionId string

Promise<boolean>