Skip to content

Commit

Permalink
fix: directclient is not a type
Browse files Browse the repository at this point in the history
  • Loading branch information
odilitime committed Nov 26, 2024
1 parent ac3188b commit 274f821
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions agent/src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,6 @@ import yargs from "yargs";
import path from "path";
import { fileURLToPath } from "url";
import { character } from "./character.ts";
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 @@ -276,7 +275,7 @@ function intializeDbCache(character: Character, db: IDatabaseCacheAdapter) {
return cache;
}

async function startAgent(character: Character, directClient: DirectClient) {
async function startAgent(character: Character, directClient) {
try {
character.id ??= stringToUuid(character.name);
character.username ??= character.name;
Expand Down Expand Up @@ -326,7 +325,7 @@ const startAgents = async () => {

try {
for (const character of characters) {
await startAgent(character, directClient as DirectClient);
await startAgent(character, directClient);
}
} catch (error) {
elizaLogger.error("Error starting agents:", error);
Expand Down

0 comments on commit 274f821

Please sign in to comment.