Skip to content

Commit

Permalink
Merge pull request elizaOS#484 from bmgalego/improvements
Browse files Browse the repository at this point in the history
fix: agent type error and sqlite file env
  • Loading branch information
bmgalego authored Nov 21, 2024
2 parents 83a5ae2 + 3717a95 commit 60164cd
Showing 1 changed file with 4 additions and 5 deletions.
9 changes: 4 additions & 5 deletions agent/src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -181,10 +181,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;
}
Expand Down

0 comments on commit 60164cd

Please sign in to comment.