Skip to content
0

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 ​

ParameterType
sessionIdstring
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.contentstring | 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 ​

ParameterType
channel?string

Returns ​

Promise<string>


useExists() ​

ts
useExists(sessionId): Promise<boolean>;

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

Parameters ​

ParameterType
sessionIdstring

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 ​

ParameterType
sessionIdstring

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 ​

ParameterType
sessionIdstring

Returns ​

Promise<void>

Released under the MIT License.