瀏覽代碼

make gemini robust (#3012)

### What problem does this PR solve?

#3003

### Type of change

- [x] Bug Fix (non-breaking change which fixes an issue)
tags/v0.13.0
Kevin Hu 1 年之前
父節點
當前提交
9457d20ef1
沒有連結到貢獻者的電子郵件帳戶。
共有 1 個檔案被更改,包括 2 行新增1 行删除
  1. 2
    1
      rag/llm/chat_model.py

+ 2
- 1
rag/llm/chat_model.py 查看文件

@@ -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…
取消
儲存