Skip to content

Commit 21a8c96

Browse files
fix: char
1 parent ca99c91 commit 21a8c96

File tree

1 file changed

+9
-2
lines changed

1 file changed

+9
-2
lines changed

agent/src/index.ts

+9-2
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ import readline from "readline";
3232
import yargs from "yargs";
3333
import path from "path";
3434
import { fileURLToPath } from "url";
35-
import blobert from "./blobert.ts";
35+
import { character } from "./character.ts";
3636
import type { DirectClient } from "@ai16z/client-direct";
3737

3838
const __filename = fileURLToPath(import.meta.url); // get the resolved path to the file
@@ -263,6 +263,13 @@ export function createAgent(
263263
});
264264
}
265265

266+
function intializeFsCache(baseDir: string, character: Character) {
267+
const cacheDir = path.resolve(baseDir, character.id, "cache");
268+
269+
const cache = new CacheManager(new FsCacheAdapter(cacheDir));
270+
return cache;
271+
}
272+
266273
function intializeDbCache(character: Character, db: IDatabaseCacheAdapter) {
267274
const cache = new CacheManager(new DbCacheAdapter(db, character.id));
268275
return cache;
@@ -310,7 +317,7 @@ const startAgents = async () => {
310317

311318
let charactersArg = args.characters || args.character;
312319

313-
let characters = [blobert];
320+
let characters = [character];
314321

315322
if (charactersArg) {
316323
characters = await loadCharacters(charactersArg);

0 commit comments

Comments
 (0)