关闭思考,温度0.1

This commit is contained in:
2026-07-29 08:10:09 +08:00
parent 467d879dc3
commit c90718c6de
3 changed files with 4 additions and 5 deletions

View File

@@ -19,10 +19,9 @@ function getErrorMsg(status, data) {
}
}
async function callDeepSeek(messages, temperature, userId) {
if (temperature === undefined) temperature = 0.1;
async function callDeepSeek(messages, userId, temperature = 0.1) {
console.log('调用 DeepSeek...');
var body = { model: 'deepseek-v4-flash', messages: messages, temperature: temperature, stream: false };
var body = { model: 'deepseek-v4-flash', messages: messages, temperature: temperature, stream: false, thinking: { type: 'disabled' } };
if (userId) body.user_id = sanitizeUserId(userId);
var res = await fetch('https://api.deepseek.com/chat/completions', {
method: 'POST',