We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
send_message_and_get_response
1 parent b6dbbe4 commit 8b02fa3Copy full SHA for 8b02fa3
1 file changed
src/eaa/agents/base.py
@@ -95,6 +95,7 @@
95
import json
96
import logging
97
import asyncio
98
+import time
99
100
import numpy as np
101
@@ -723,8 +724,15 @@ def receive(
723
724
725
# Send messages, get response and print it.
726
if request_response:
- response = self.send_message_and_get_response(combined_messages)
727
- print_message(response)
+ for i in range(5):
728
+ try:
729
+ response = self.send_message_and_get_response(combined_messages)
730
+ print_message(response)
731
+ break
732
+ except Exception as e:
733
+ logger.error(f"Error sending message and getting response: {e}")
734
+ logger.error(f"Retrying...({i+1}/5)")
735
+ time.sleep(1)
736
737
if request_response and self.memory_manager is not None and message is not None:
738
self._post_response_memory_update(
0 commit comments