mirror of
https://git.mirrors.martin98.com/https://github.com/infiniflow/ragflow.git
synced 2025-08-14 05:55:59 +08:00
fix OpenAI llm return bug (#1728)
### What problem does this PR solve? fix OpenAI llm return bug ### Type of change - [x] Bug Fix (non-breaking change which fixes an issue)
This commit is contained in:
parent
549d67e281
commit
61096596bc
@ -62,6 +62,8 @@ class Base(ABC):
|
|||||||
**gen_conf)
|
**gen_conf)
|
||||||
for resp in response:
|
for resp in response:
|
||||||
if not resp.choices:continue
|
if not resp.choices:continue
|
||||||
|
if not resp.choices[0].delta.content:
|
||||||
|
resp.choices[0].delta.content = ""
|
||||||
ans += resp.choices[0].delta.content
|
ans += resp.choices[0].delta.content
|
||||||
total_tokens = (
|
total_tokens = (
|
||||||
(
|
(
|
||||||
|
Loading…
x
Reference in New Issue
Block a user