ConversationStore
katanakit-js / ConversationStore
Interface: ConversationStore
Section titled “Interface: ConversationStore”Defined in: types/core/ai.ts:89
Persistence contract for assistant conversations.
Methods
Section titled “Methods”useAppend()
Section titled “useAppend()”useAppend(sessionId, message): Promise<void>;Defined in: types/core/ai.ts:92
Parameters
Section titled “Parameters”| 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"; }[] |
Returns
Section titled “Returns”Promise<void>
useCreate()
Section titled “useCreate()”useCreate(channel?): Promise<string>;Defined in: types/core/ai.ts:90
Parameters
Section titled “Parameters”| Parameter | Type |
|---|---|
channel? |
string |
Returns
Section titled “Returns”Promise<string>
useExists()
Section titled “useExists()”useExists(sessionId): Promise<boolean>;Defined in: types/core/ai.ts:91
Parameters
Section titled “Parameters”| Parameter | Type |
|---|---|
sessionId |
string |
Returns
Section titled “Returns”Promise<boolean>
useGetHistory()
Section titled “useGetHistory()”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
Parameters
Section titled “Parameters”| Parameter | Type |
|---|---|
sessionId |
string |
Returns
Section titled “Returns”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()
Section titled “useReset()”useReset(sessionId): Promise<void>;Defined in: types/core/ai.ts:94
Parameters
Section titled “Parameters”| Parameter | Type |
|---|---|
sessionId |
string |
Returns
Section titled “Returns”Promise<void>