Skip to content

ConversationStore

katanakit-js / ConversationStore

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

Persistence contract for assistant conversations.

useAppend(sessionId, message): Promise<void>;

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

Parameter Type
sessionId string
message { 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"; }[]; }
message.content? string | null
message.name? string
message.role? "system" | "user" | "assistant" | "tool"
message.tool_call_id? string
message.tool_calls? { function: { arguments: string; name: string; }; id: string; type: "function"; }[]

Promise<void>


useCreate(channel?): Promise<string>;

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

Parameter Type
channel? string

Promise<string>


useExists(sessionId): Promise<boolean>;

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

Parameter Type
sessionId string

Promise<boolean>


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:93

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


useReset(sessionId): Promise<void>;

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

Parameter Type
sessionId string

Promise<void>