Skip to content

Commit

Permalink
Disallow modifying message from response validator for now
Browse files Browse the repository at this point in the history
  • Loading branch information
VRSEN committed Jul 17, 2024
1 parent 245c4de commit 9a8f64e
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion agency_swarm/threads/thread.py
Original file line number Diff line number Diff line change
Expand Up @@ -261,7 +261,8 @@ def handle_output(tool_call, output):
if recipient_agent.response_validator:
try:
if isinstance(recipient_agent, Agent):
last_message = recipient_agent.response_validator(message=last_message)
# TODO: allow users to modify the last message from response validator and replace it on OpenAI
recipient_agent.response_validator(message=last_message)
except Exception as e:
if validation_attempts < recipient_agent.validation_attempts:
try:
Expand Down

0 comments on commit 9a8f64e

Please sign in to comment.