diff --git a/pkg/provider/modelmgr/requesters/moonshotchatcmpl.py b/pkg/provider/modelmgr/requesters/moonshotchatcmpl.py index b8c0e950..494b2b0f 100644 --- a/pkg/provider/modelmgr/requesters/moonshotchatcmpl.py +++ b/pkg/provider/modelmgr/requesters/moonshotchatcmpl.py @@ -55,6 +55,6 @@ class MoonshotChatCompletions(chatcmpl.OpenAIChatCompletions): resp = await self._req(args, extra_body=extra_args) # 处理请求结果 - message = await self._make_msg(resp,remove_think) + message = await self._make_msg(resp, remove_think) return message diff --git a/pkg/provider/runners/dashscopeapi.py b/pkg/provider/runners/dashscopeapi.py index 9bb5824c..7f66e6f0 100644 --- a/pkg/provider/runners/dashscopeapi.py +++ b/pkg/provider/runners/dashscopeapi.py @@ -148,7 +148,7 @@ class DashScopeAPIRunner(runner.RequestRunner): # 将参考资料替换到文本中 pending_content = self._replace_references(pending_content, references_dict) - if idx_chunk % 64 == 0 or is_final: + if idx_chunk % 8 == 0 or is_final: yield llm_entities.MessageChunk( role='assistant', content=pending_content, diff --git a/pkg/provider/runners/difysvapi.py b/pkg/provider/runners/difysvapi.py index 40a3140c..8c1307a5 100644 --- a/pkg/provider/runners/difysvapi.py +++ b/pkg/provider/runners/difysvapi.py @@ -115,7 +115,7 @@ class DifyServiceAPIRunner(runner.RequestRunner): stream_output_pending_chunk = '' - batch_pending_max_size = 64 # 积累一定量的消息更新消息一次 + batch_pending_max_size = 8 # 积累一定量的消息更新消息一次 batch_pending_index = 0