Ver código fonte

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 ano atrás
pai
commit
9457d20ef1
Nenhuma conta vinculada ao e-mail do autor do commit
1 arquivos alterados com 2 adições e 1 exclusões
  1. 2
    1
      rag/llm/chat_model.py

+ 2
- 1
rag/llm/chat_model.py Ver arquivo

@@ -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:

Carregando…
Cancelar
Salvar