Skip to content

Commit

Permalink
Merge pull request #605 from odilitime/fix-agent
Browse files Browse the repository at this point in the history
fix: agent DirectClient is not a type
  • Loading branch information
shakkernerd authored Nov 26, 2024
2 parents 036fefa + d1eb0d5 commit d6b20c9
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 @@ -38,7 +38,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 @@ -292,7 +291,7 @@ function intializeDbCache(character: Character, db: IDatabaseCacheAdapter) {
return cache;
}

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

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

0 comments on commit d6b20c9

Please sign in to comment.