qdqd commited on
Commit
30a70d5
·
verified ·
1 Parent(s): da76b68

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +1 -1
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() # Split the response into words
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...")