Skip to content

Commit

Permalink
remove logs
Browse files Browse the repository at this point in the history
  • Loading branch information
lalalune committed Feb 25, 2024
1 parent 311e7f5 commit 948e76f
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 13 deletions.
11 changes: 1 addition & 10 deletions src/lib/evaluators/goal.ts
Original file line number Diff line number Diff line change
Expand Up @@ -57,23 +57,15 @@ async function handler(
template,
});

console.log("**** context");
console.log(context);

// Request completion from OpenAI to analyze conversation and suggest goal updates
const response = await runtime.completion({
context,
stop: [],
});

console.log("response");
console.log(response);

// Parse the JSON response to extract goal updates
const updates = parseJsonArrayFromText(response);

console.log("*** updates", updates);

// get goals
goalsData = await getGoals({
runtime,
Expand All @@ -94,11 +86,10 @@ async function handler(

// Update goals in the database
for (const goal of updatedGoals) {
const result = await runtime.supabase
await runtime.supabase
.from("goals")
.update({ ...goal })
.match({ id: goal.id });
console.log("result", result);
}

return updatedGoals; // Return updated goals for further processing or logging
Expand Down
3 changes: 0 additions & 3 deletions src/lib/runtime.ts
Original file line number Diff line number Diff line change
Expand Up @@ -345,7 +345,6 @@ export class BgentRuntime {
const { senderId, room_id, userIds: user_ids, agentId } = message;

for (let triesLeft = 3; triesLeft > 0; triesLeft--) {
console.log("*** context\n", context);
const response = await this.completion({
context,
stop: [],
Expand Down Expand Up @@ -391,8 +390,6 @@ export class BgentRuntime {
};
}

console.log("*** responseContent\n", responseContent);

const _saveResponseMessage = async (
message: Message,
state: State,
Expand Down

0 comments on commit 948e76f

Please sign in to comment.