feat: 增加OPENAI的extra_body配置各厂商独有特性 #1920
Closed
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
豆包、阿里新模型均可以选择深度思考、非深度思考,但默认为深度思考,导致每轮对话性能较差。他们在extra_body提供了参数可以进行控制,设置disable后可大大提高对话性能。
默认情况,启动深度思考
250725 13:57:05[0.7.2-SiFuDoEdnocaCh][core.handle.textHandle]-INFO-收到listen消息:{"type":"listen","mode":"manual","state":"detect","text":"你好,介绍下你自己"}
250725 13:57:05[0.7.2-SiFuDoEdnocaCh][core.connection]-INFO-大模型收到用户消息: 你好,介绍下你自己
250725 13:57:07[0.7.2-SiFuDoEdnocaCh][core.handle.sendAudioHandle]-INFO-发送音频消息: SentenceType.MIDDLE, 哈喽
250725 13:57:07[0.7.2-SiFuDoEdnocaCh][core.handle.sendAudioHandle]-INFO-发送第一段语音: 哈喽
250725 13:57:08[0.7.2-SiFuDoEdnocaCh][core.handle.sendAudioHandle]-INFO-发送音频消息: SentenceType.MIDDLE, 我是来自中国台湾省的小智啦~讲话超机车的00后女生
配置关闭深度思考
250725 13:58:08[0.7.2-SiFuDoEdnocaCh][core.handle.textHandle]-INFO-收到listen消息:{"type":"listen","mode":"manual","state":"detect","text":"你好,介绍下你自己"}
250725 13:58:08[0.7.2-SiFuDoEdnocaCh][core.connection]-INFO-大模型收到用户消息: 你好,介绍下你自己
250725 13:58:29[0.7.2-SiFuDoEdnocaCh][core.handle.sendAudioHandle]-INFO-发送音频消息: SentenceType.MIDDLE, 哈喽~
250725 13:58:29[0.7.2-SiFuDoEdnocaCh][core.handle.sendAudioHandle]-INFO-发送第一段语音: 哈喽~
250725 13:58:30[0.7.2-SiFuDoEdnocaCh][core.handle.sendAudioHandle]-INFO-发送音频消息: SentenceType.MIDDLE, 我是小智啦