katanakit-js / ConversationStore
Interface: ConversationStore
Defined in: src/types/index.ts:890
Persistence contract for assistant conversations.
Methods
useAppend()
ts
useAppend(sessionId, message): Promise<void>;Defined in: src/types/index.ts:893
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
Promise<void>
useCreate()
ts
useCreate(channel?): Promise<string>;Defined in: src/types/index.ts:891
Parameters
| Parameter | Type |
|---|---|
channel? | string |
Returns
Promise<string>
useExists()
ts
useExists(sessionId): Promise<boolean>;Defined in: src/types/index.ts:892
Parameters
| Parameter | Type |
|---|---|
sessionId | string |
Returns
Promise<boolean>
useGetHistory()
ts
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: src/types/index.ts:894
Parameters
| Parameter | Type |
|---|---|
sessionId | string |
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()
ts
useReset(sessionId): Promise<void>;Defined in: src/types/index.ts:895
Parameters
| Parameter | Type |
|---|---|
sessionId | string |
Returns
Promise<void>