Skip to content

Commit

Permalink
working
Browse files Browse the repository at this point in the history
  • Loading branch information
humanagent committed Dec 24, 2024
1 parent 177c51d commit f128a37
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 4 deletions.
2 changes: 0 additions & 2 deletions packages/client-telegram/src/messageManager.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1053,7 +1053,6 @@ export class MessageManager {

if (shouldRespond) {
// Generate response
console.log("checkpoint 1", state);
const template =
this.runtime.character.templates
?.telegramMessageHandlerTemplate ||
Expand All @@ -1063,7 +1062,6 @@ export class MessageManager {
state,
template,
});
console.log("checkpoint 2", context);
const responseContent = await this._generateResponse(
memory,
state,
Expand Down
2 changes: 0 additions & 2 deletions packages/core/src/generation.ts
Original file line number Diff line number Diff line change
Expand Up @@ -904,15 +904,13 @@ export async function generateMessageResponse({
context,
modelClass,
});
console.log("checkpoint 1", response);
// try parsing the response as JSON, if null then try again
const parsedContent = parseJSONObjectFromText(response) as Content;
if (!parsedContent) {
elizaLogger.debug("parsedContent is null, retrying");
continue;
}

console.log("checkpoint 2", parsedContent);
return parsedContent;
} catch (error) {
elizaLogger.error("ERROR:", error);
Expand Down

0 comments on commit f128a37

Please sign in to comment.