瀏覽代碼

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)
tags/v0.9.0
黄腾 1 年之前
父節點
當前提交
61096596bc
沒有連結到貢獻者的電子郵件帳戶。
共有 1 個檔案被更改,包括 2 行新增0 行删除
  1. 2
    0
      rag/llm/chat_model.py

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

@@ -62,6 +62,8 @@ class Base(ABC):
**gen_conf)
for resp in response:
if not resp.choices:continue
if not resp.choices[0].delta.content:
resp.choices[0].delta.content = ""
ans += resp.choices[0].delta.content
total_tokens = (
(

Loading…
取消
儲存