Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: agent DirectClient is not a type #605

Merged
merged 2 commits into from
Nov 26, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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