Kevin Hu commited on
Commit
412edc4
·
1 Parent(s): 91ede52

fix error in exception (#2694)

Browse files

### What problem does this PR solve?
#2670

### Type of change

- [x] Bug Fix (non-breaking change which fixes an issue)

Files changed (1) hide show
  1. rag/llm/chat_model.py +1 -1
rag/llm/chat_model.py CHANGED
@@ -1340,7 +1340,7 @@ class GoogleChat(Base):
1340
  + response["usage"]["output_tokens"],
1341
  )
1342
  except Exception as e:
1343
- return ans + "\n**ERROR**: " + str(e), 0
1344
  else:
1345
  self.client._system_instruction = self.system
1346
  if "max_tokens" in gen_conf:
 
1340
  + response["usage"]["output_tokens"],
1341
  )
1342
  except Exception as e:
1343
+ return "\n**ERROR**: " + str(e), 0
1344
  else:
1345
  self.client._system_instruction = self.system
1346
  if "max_tokens" in gen_conf: