Skip to content

Commit

Permalink
Merge pull request elizaOS#545 from bmgalego/more-fixes
Browse files Browse the repository at this point in the history
fix: error in getGoals and remove coinbase package-lock.json
bmgalego authored Nov 23, 2024
2 parents a0b3f4b + ae97d6e commit a395ba1
Showing 6 changed files with 6 additions and 3,981 deletions.
2 changes: 1 addition & 1 deletion packages/adapter-postgres/src/index.ts
Original file line number Diff line number Diff line change
@@ -344,7 +344,7 @@ export class PostgresDatabaseAdapter
}): Promise<Memory[]> {
if (!params.tableName) throw new Error("tableName is required");
if (!params.roomId) throw new Error("roomId is required");
let sql = `SELECT * FROM memories WHERE type = $1 AND agentId = $2 AND "roomId" = $3`;
let sql = `SELECT * FROM memories WHERE type = $1 AND "agentId" = $2 AND "roomId" = $3`;
const values: any[] = [params.tableName, params.agentId, params.roomId];
let paramCount = 2;

3 changes: 2 additions & 1 deletion packages/adapter-postgres/tsconfig.json
Original file line number Diff line number Diff line change
@@ -2,7 +2,8 @@
"extends": "../../tsconfig.json",
"compilerOptions": {
"outDir": "dist",
"rootDir": "src"
"rootDir": "src",
"strict": true
},
"include": ["src/**/*.ts"]
}
3 changes: 2 additions & 1 deletion packages/adapter-sqlite/tsconfig.json
Original file line number Diff line number Diff line change
@@ -2,7 +2,8 @@
"extends": "../../tsconfig.json",
"compilerOptions": {
"outDir": "dist",
"rootDir": "src"
"rootDir": "src",
"strict": true
},
"include": ["src/**/*.ts"]
}
4 changes: 1 addition & 3 deletions packages/core/src/goals.ts
Original file line number Diff line number Diff line change
@@ -6,22 +6,20 @@ import {
} from "./types.ts";

export const getGoals = async ({
agentId,
runtime,
roomId,
userId,
onlyInProgress = true,
count = 5,
}: {
runtime: IAgentRuntime;
agentId: UUID;
roomId: UUID;
userId?: UUID;
onlyInProgress?: boolean;
count?: number;
}) => {
return runtime.databaseAdapter.getGoals({
agentId,
agentId: runtime.agentId,
roomId,
userId,
onlyInProgress,
1 change: 0 additions & 1 deletion packages/core/src/runtime.ts
Original file line number Diff line number Diff line change
@@ -741,7 +741,6 @@ export class AgentRuntime implements IAgentRuntime {
unique: false,
}),
getGoals({
agentId: this.agentId,
runtime: this,
count: 10,
onlyInProgress: false,
Loading
Oops, something went wrong.

0 comments on commit a395ba1

Please sign in to comment.