Skip to content

Commit

Permalink
improved logging and cleanup
Browse files Browse the repository at this point in the history
  • Loading branch information
jfrank-summit committed Dec 25, 2024
1 parent 9b3fabc commit 0da26ab
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import { AIMessage } from '@langchain/core/messages';
import { State, logger, parseMessageContent } from '../workflow.js';
import * as prompts from '../prompts.js';
import { WorkflowConfig } from '../workflow.js';
import { getLastDsnCid, updateResponseStatusByTweetId } from '../../../database/index.js';
import { updateResponseStatusByTweetId } from '../../../database/index.js';
import { uploadToDsn } from '../../../utils/dsn.js';
import { config as globalConfig } from '../../../config/index.js';
import { ResponseStatus } from '../../../types/queue.js';
Expand Down
11 changes: 11 additions & 0 deletions auto-kol/agent/src/services/agents/nodes/responseGenerationNode.ts
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,11 @@ export const createResponseGenerationNode = (config: WorkflowConfig) => {
await Promise.all(
batchToRespond.map(async (item: any) => {
const { tweet, decision, toneAnalysis, workflowState } = item;
logger.info('Processing tweet:', {
id: tweet.id,
author: tweet.author_username,
});


if (!workflowState) {
item.workflowState = { autoFeedback: [] };
Expand Down Expand Up @@ -81,6 +86,12 @@ export const createResponseGenerationNode = (config: WorkflowConfig) => {
rejectionInstructions,
});

logger.info('Response strategy:', {
content: responseStrategy.content,
tone: responseStrategy.tone,
strategy: responseStrategy.strategy,
});

const data = {
type: ResponseStatus.PENDING,
tweet,
Expand Down

0 comments on commit 0da26ab

Please sign in to comment.