mirror of
https://github.com/langbot-app/LangBot.git
synced 2026-06-02 03:55:55 +00:00
feat(chat_completion): 不生成到stop以使max_tokens参数生效
This commit is contained in:
@@ -87,7 +87,7 @@ class ChatCompletionRequest(RequestBase):
|
||||
choice0 = resp["choices"][0]
|
||||
|
||||
# 如果不是函数调用,且finish_reason为stop,则停止迭代
|
||||
if 'function_call' not in choice0['message'] and choice0["finish_reason"] == "stop":
|
||||
if 'function_call' not in choice0['message']: # and choice0["finish_reason"] == "stop"
|
||||
self.stopped = True
|
||||
|
||||
if 'function_call' in choice0['message']:
|
||||
|
||||
Reference in New Issue
Block a user