mirror of
https://git.mirrors.martin98.com/https://github.com/infiniflow/ragflow.git
synced 2025-08-14 09:16:00 +08:00
fixed: The choices may be empty. (#876)
### What problem does this PR solve? ### Type of change - [x] Bug Fix (non-breaking change which fixes an issue)
This commit is contained in:
parent
be13429d05
commit
21453ffff0
@ -56,6 +56,7 @@ class Base(ABC):
|
||||
stream=True,
|
||||
**gen_conf)
|
||||
for resp in response:
|
||||
if len(resp.choices) == 0:continue
|
||||
if not resp.choices[0].delta.content:continue
|
||||
ans += resp.choices[0].delta.content
|
||||
total_tokens += 1
|
||||
|
Loading…
x
Reference in New Issue
Block a user