Skip to content

Commit

Permalink
Merge pull request #509 from ai16z/fix/services
Browse files Browse the repository at this point in the history
fix: services fix
  • Loading branch information
ponderingdemocritus authored Nov 22, 2024
2 parents c0c30ae + 5d7d729 commit 32bab40
Show file tree
Hide file tree
Showing 5 changed files with 49 additions and 40 deletions.
4 changes: 1 addition & 3 deletions packages/adapter-postgres/src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -226,7 +226,7 @@ export class PostgresDatabaseAdapter
if (rows.length === 0) return null;

const account = rows[0];
elizaLogger.log("account", account);
// elizaLogger.log("account", account);
return {
...account,
details:
Expand Down Expand Up @@ -409,8 +409,6 @@ export class PostgresDatabaseAdapter
values.push(params.count);
}

elizaLogger.log("sql", sql, values);

const { rows } = await client.query(sql, values);
return rows.map((row) => ({
...row,
Expand Down
5 changes: 5 additions & 0 deletions packages/client-discord/src/voice.ts
Original file line number Diff line number Diff line change
Expand Up @@ -416,6 +416,11 @@ export class VoiceManager extends EventEmitter {
ServiceType.TRANSCRIPTION
);

console.log(
"transcriptionService: ",
transcriptionService
);

if (!transcriptionService) {
throw new Error(
"Transcription generation service not found"
Expand Down
2 changes: 1 addition & 1 deletion packages/core/src/memory.ts
Original file line number Diff line number Diff line change
Expand Up @@ -185,7 +185,7 @@ export class MemoryManager implements IMemoryManager {
return;
}

elizaLogger.log("Creating Memory", memory.id, memory.content.text);
elizaLogger.debug("Creating Memory", memory.id, memory.content.text);
await this.runtime.databaseAdapter.createMemory(
memory,
this.tableName,
Expand Down
6 changes: 6 additions & 0 deletions packages/core/src/runtime.ts
Original file line number Diff line number Diff line change
Expand Up @@ -175,6 +175,8 @@ export class AgentRuntime implements IAgentRuntime {
);
return;
}

this.services.set(serviceType, service);
}

/**
Expand Down Expand Up @@ -302,6 +304,10 @@ export class AgentRuntime implements IAgentRuntime {
this.registerEvaluator(evaluator);
});

plugin.services?.forEach((service) => {
this.registerService(service);
});

plugin.providers?.forEach((provider) => {
this.registerContextProvider(provider);
});
Expand Down
72 changes: 36 additions & 36 deletions pnpm-lock.yaml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit 32bab40

Please sign in to comment.