refactor: deepModels -> tinkIgnore
This commit is contained in:
@@ -39,7 +39,6 @@ import {
|
||||
import { sha256 } from "../libs/utils";
|
||||
import interpreter from "../libs/interpreter";
|
||||
import { msAuth } from "../libs/auth";
|
||||
import {getSettingWithDefault } from "../libs/storage";
|
||||
|
||||
/**
|
||||
* 同步数据
|
||||
@@ -324,8 +323,8 @@ export const apiTranslate = async ({
|
||||
case OPT_TRANS_OLLAMA:
|
||||
case OPT_TRANS_OLLAMA_2:
|
||||
case OPT_TRANS_OLLAMA_3:
|
||||
let deepModels = (await getSettingWithDefault()).transApis[translator]?.thinkIgnore || '';
|
||||
deepModels = deepModels.split(',').filter(model => model.trim() !== '');
|
||||
const { thinkIgnore = "" } = apiSetting;
|
||||
const deepModels = thinkIgnore.split(',').filter(model => model.trim());
|
||||
if (deepModels.some(model => res?.model?.startsWith(model))) {
|
||||
trText = res?.response.replace(/<think>[\s\S]*<\/think>/i, '');
|
||||
}else{
|
||||
|
||||
@@ -118,7 +118,7 @@ function ApiFields({ translator }) {
|
||||
model = "",
|
||||
systemPrompt = "",
|
||||
userPrompt = "",
|
||||
think="",
|
||||
think = false,
|
||||
thinkIgnore = "",
|
||||
fetchLimit = DEFAULT_FETCH_LIMIT,
|
||||
fetchInterval = DEFAULT_FETCH_INTERVAL,
|
||||
|
||||
Reference in New Issue
Block a user