feat: 适配completion和chat_completions

This commit is contained in:
RockChinQ
2023-11-10 11:31:14 +08:00
parent c7a9988033
commit 2b852853f3
6 changed files with 74 additions and 85 deletions
+1 -1
View File
@@ -278,7 +278,7 @@ class Session:
if resp['choices'][0]['message']['role'] == "assistant" and resp['choices'][0]['message']['content'] != None: # 包含纯文本响应
if not trace_func_calls:
res_text += resp['choices'][0]['message']['content'] + "\n"
res_text += resp['choices'][0]['message']['content']
else:
res_text = resp['choices'][0]['message']['content']
pending_res_text = resp['choices'][0]['message']['content']