Update app.py
Browse files
app.py
CHANGED
@@ -8,7 +8,7 @@ def get_llm_response(prompt, model, max_retries=3):
|
|
8 |
for attempt in range(max_retries):
|
9 |
try:
|
10 |
response = DDGS().chat(prompt, model=model)
|
11 |
-
return response.split()
|
12 |
except Exception as e:
|
13 |
if attempt < max_retries - 1:
|
14 |
print(f"Error occurred: {e}. Retrying in {2**attempt} seconds...")
|
|
|
8 |
for attempt in range(max_retries):
|
9 |
try:
|
10 |
response = DDGS().chat(prompt, model=model)
|
11 |
+
return response.split()
|
12 |
except Exception as e:
|
13 |
if attempt < max_retries - 1:
|
14 |
print(f"Error occurred: {e}. Retrying in {2**attempt} seconds...")
|