mirror of
https://github.com/xinnan-tech/xiaozhi-esp32-server.git
synced 2026-11-26 04:39:53 +01:00
Merge pull request #3313 from xinnan-tech/fix-deepseek-model
deepseek更改模型为v4-flash并且关闭思考模式
This commit is contained in:
commit
7475ea2b2d
5 changed files with 14 additions and 1 deletions
|
|
@ -36,6 +36,7 @@ public class OpenAIStyleLLMServiceImpl implements LLMService {
|
||||||
static {
|
static {
|
||||||
THINKING_DISABLED_DOMAINS.put("aliyuncs.com", Map.of("enable_thinking", false));
|
THINKING_DISABLED_DOMAINS.put("aliyuncs.com", Map.of("enable_thinking", false));
|
||||||
Map<String, Object> thinkingDisabled = Map.of("thinking", Map.of("type", "disabled"));
|
Map<String, Object> thinkingDisabled = Map.of("thinking", Map.of("type", "disabled"));
|
||||||
|
THINKING_DISABLED_DOMAINS.put("deepseek.com", thinkingDisabled);
|
||||||
THINKING_DISABLED_DOMAINS.put("bigmodel.cn", thinkingDisabled);
|
THINKING_DISABLED_DOMAINS.put("bigmodel.cn", thinkingDisabled);
|
||||||
THINKING_DISABLED_DOMAINS.put("moonshot.cn", thinkingDisabled);
|
THINKING_DISABLED_DOMAINS.put("moonshot.cn", thinkingDisabled);
|
||||||
THINKING_DISABLED_DOMAINS.put("volces.com", thinkingDisabled);
|
THINKING_DISABLED_DOMAINS.put("volces.com", thinkingDisabled);
|
||||||
|
|
|
||||||
|
|
@ -0,0 +1,4 @@
|
||||||
|
UPDATE `ai_model_config`
|
||||||
|
SET `config_json` = JSON_SET(`config_json`, '$.model_name', 'deepseek-v4-flash')
|
||||||
|
WHERE `id` = 'LLM_DeepSeekLLM'
|
||||||
|
AND JSON_EXTRACT(`config_json`, '$.model_name') = 'deepseek-chat';
|
||||||
|
|
@ -718,3 +718,10 @@ databaseChangeLog:
|
||||||
- sqlFile:
|
- sqlFile:
|
||||||
encoding: utf8
|
encoding: utf8
|
||||||
path: classpath:db/changelog/202607290930.sql
|
path: classpath:db/changelog/202607290930.sql
|
||||||
|
- changeSet:
|
||||||
|
id: 202608061000
|
||||||
|
author: cgd
|
||||||
|
changes:
|
||||||
|
- sqlFile:
|
||||||
|
encoding: utf8
|
||||||
|
path: classpath:db/changelog/202608061030.sql
|
||||||
|
|
|
||||||
|
|
@ -649,7 +649,7 @@ LLM:
|
||||||
# 定义LLM API类型
|
# 定义LLM API类型
|
||||||
type: openai
|
type: openai
|
||||||
# 可在这里找到你的api key https://platform.deepseek.com/
|
# 可在这里找到你的api key https://platform.deepseek.com/
|
||||||
model_name: deepseek-chat
|
model_name: deepseek-v4-flash
|
||||||
url: https://api.deepseek.com
|
url: https://api.deepseek.com
|
||||||
api_key: 你的deepseek web key
|
api_key: 你的deepseek web key
|
||||||
ChatGLMLLM:
|
ChatGLMLLM:
|
||||||
|
|
|
||||||
|
|
@ -12,6 +12,7 @@ logger = setup_logging()
|
||||||
# 需要禁用思考模式的平台域名及其对应参数(默认关闭思考模式)
|
# 需要禁用思考模式的平台域名及其对应参数(默认关闭思考模式)
|
||||||
THINKING_DISABLED_DOMAINS = {
|
THINKING_DISABLED_DOMAINS = {
|
||||||
"aliyuncs.com": {"enable_thinking": False},
|
"aliyuncs.com": {"enable_thinking": False},
|
||||||
|
"deepseek.com": {"thinking": {"type": "disabled"}},
|
||||||
"bigmodel.cn": {"thinking": {"type": "disabled"}},
|
"bigmodel.cn": {"thinking": {"type": "disabled"}},
|
||||||
"moonshot.cn": {"thinking": {"type": "disabled"}},
|
"moonshot.cn": {"thinking": {"type": "disabled"}},
|
||||||
"volces.com": {"thinking": {"type": "disabled"}},
|
"volces.com": {"thinking": {"type": "disabled"}},
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue