mirror of
https://git.mirrors.martin98.com/https://github.com/infiniflow/ragflow.git
synced 2025-08-14 01:45:59 +08:00
make gemini robust (#3012)
### What problem does this PR solve? #3003 ### Type of change - [x] Bug Fix (non-breaking change which fixes an issue)
This commit is contained in:
parent
648f8e81d1
commit
9457d20ef1
@ -780,10 +780,11 @@ class GeminiChat(Base):
|
||||
ans += resp.text
|
||||
yield ans
|
||||
|
||||
yield response._chunks[-1].usage_metadata.total_token_count
|
||||
except Exception as e:
|
||||
yield ans + "\n**ERROR**: " + str(e)
|
||||
|
||||
yield response._chunks[-1].usage_metadata.total_token_count
|
||||
yield 0
|
||||
|
||||
|
||||
class GroqChat:
|
||||
|
Loading…
x
Reference in New Issue
Block a user