generate fact triggers on each turn
This commit is contained in:
@@ -15,6 +15,16 @@ export type Fact = {
|
||||
createdAt: string;
|
||||
};
|
||||
|
||||
export type FactTrigger = {
|
||||
id: string;
|
||||
sourceFactId: string;
|
||||
content: string;
|
||||
priorityMultiplier: number;
|
||||
priorityMultiplierReason: string;
|
||||
scopeConversationId: string;
|
||||
createdAt: string;
|
||||
};
|
||||
|
||||
type DB = {
|
||||
conversations: Array<Conversation>;
|
||||
messages: Array<{
|
||||
@@ -27,12 +37,14 @@ type DB = {
|
||||
runningSummary?: string;
|
||||
}>;
|
||||
facts: Array<Fact>;
|
||||
factTriggers: Array<FactTrigger>;
|
||||
};
|
||||
|
||||
export const db = new Low<DB>(new JSONFile("db.json"), {
|
||||
conversations: [],
|
||||
messages: [],
|
||||
facts: [],
|
||||
factTriggers: [],
|
||||
});
|
||||
/** Initialize the database. Sets `db.data` to the default state if the file doesn't exist. */
|
||||
await db.read();
|
||||
|
||||
Reference in New Issue
Block a user