From e70e67516e17437735dbdfc0035299fa71c29b20 Mon Sep 17 00:00:00 2001 From: Bruno Galego Date: Thu, 21 Nov 2024 12:32:12 +0000 Subject: [PATCH 1/2] fix sqlite file env --- agent/src/index.ts | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/agent/src/index.ts b/agent/src/index.ts index fdea3361b17..0dd42c9d70c 100644 --- a/agent/src/index.ts +++ b/agent/src/index.ts @@ -177,10 +177,9 @@ function initializeDatabase(dataDir: string) { }); return db; } else { - const filePath = path.resolve( - dataDir, - process.env.SQLITE_FILE ?? "db.sqlite" - ); + const filePath = + process.env.SQLITE_FILE ?? path.resolve(dataDir, "db.sqlite"); + // ":memory:"; const db = new SqliteDatabaseAdapter(new Database(filePath)); return db; } From 3717a957d5fad7c84a59cfe1b0f04a8c56688673 Mon Sep 17 00:00:00 2001 From: Bruno Galego Date: Thu, 21 Nov 2024 12:43:09 +0000 Subject: [PATCH 2/2] fix direct client type --- agent/src/index.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/agent/src/index.ts b/agent/src/index.ts index b8f47cb8b27..f9d444f5e61 100644 --- a/agent/src/index.ts +++ b/agent/src/index.ts @@ -32,7 +32,7 @@ import yargs from "yargs"; import path from "path"; import { fileURLToPath } from "url"; import { character } from "./character.ts"; -import { DirectClient } from "@ai16z/client-direct"; +import type { DirectClient } from "@ai16z/client-direct"; const __filename = fileURLToPath(import.meta.url); // get the resolved path to the file const __dirname = path.dirname(__filename); // get the name of the directory