mirror of
https://github.com/infiniflow/ragflow.git
synced 2025-12-08 20:42:30 +08:00
fix raptor bugs (#928)
### What problem does this PR solve? #922 ### Type of change - [x] Bug Fix (non-breaking change which fixes an issue)
This commit is contained in:
@ -359,7 +359,6 @@ class VolcEngineChat(Base):
|
||||
if system:
|
||||
history.insert(0, {"role": "system", "content": system})
|
||||
ans = ""
|
||||
tk_count = 0
|
||||
try:
|
||||
req = {
|
||||
"parameters": {
|
||||
@ -380,6 +379,7 @@ class VolcEngineChat(Base):
|
||||
if resp.choices[0].finish_reason == "stop":
|
||||
tk_count = resp.usage.total_tokens
|
||||
yield ans
|
||||
|
||||
except Exception as e:
|
||||
yield ans + "\n**ERROR**: " + str(e)
|
||||
yield tk_count
|
||||
|
||||
Reference in New Issue
Block a user