From 47e5cb842b8d0173783f331c6707ad0b611a9094 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fl=C3=A1vio=20Code=C3=A7o=20Coelho?= Date: Sun, 22 Sep 2024 15:15:33 -0300 Subject: [PATCH] added maximum number of retries to structured LLM chat --- base_agent/llminterface.py | 1 + 1 file changed, 1 insertion(+) diff --git a/base_agent/llminterface.py b/base_agent/llminterface.py index 31d63a8..b81c7b1 100644 --- a/base_agent/llminterface.py +++ b/base_agent/llminterface.py @@ -171,6 +171,7 @@ def get_response(self, question: str, context: str = "", response_model: BaseMod model=self.model, messages=messages, response_model=response_model, + max_retries=3 ) self.chat_history.enqueue(response)