jjz5463 commited on
Commit
42b2eba
1 Parent(s): 92e05c4

update retries

Browse files
Files changed (1) hide show
  1. chatbot_simulator.py +1 -1
chatbot_simulator.py CHANGED
@@ -70,7 +70,7 @@ class ChatbotSimulation:
70
  @retry(
71
  retry=retry_if_exception_type(RateLimitError),
72
  wait=wait_fixed(5), # Waits for 5 seconds between retries
73
- stop=stop_after_attempt(5) # Stops after 5 failed attempts
74
  )
75
  def _get_openai_response(self, prompt):
76
  """Fetch response from OpenAI API using tenacity for handling retries."""
 
70
  @retry(
71
  retry=retry_if_exception_type(RateLimitError),
72
  wait=wait_fixed(5), # Waits for 5 seconds between retries
73
+ stop=stop_after_attempt(50000) # Stops after 5 failed attempts
74
  )
75
  def _get_openai_response(self, prompt):
76
  """Fetch response from OpenAI API using tenacity for handling retries."""