修复配置项更换大模型后提交数据重复的问题

This commit is contained in:
ruotongyu
2024-07-05 20:37:43 +08:00
parent db262c2e5e
commit ab0565b033
2 changed files with 6 additions and 4 deletions

View File

@@ -27,8 +27,8 @@ export const config = {
id: 0, id: 0,
options: { options: {
initShow: true, initShow: true,
width: 800, width: 830,
height: 650, height: 670,
openDevTools: false, openDevTools: false,
frame: true, frame: true,
transparent: false, transparent: false,

View File

@@ -19,10 +19,12 @@ export function Setting(){
const onModelChange = (value: string) => { const onModelChange = (value: string) => {
switch (value) { switch (value) {
case 'openai': case 'openai':
form.setFieldsValue({ model: 'gpt-4-turbo', base_url:"https://api.openai.com/v1"}); form.resetFields(['llm'])
form.setFieldsValue({"llm": {model: 'gpt-4-turbo', base_url:"https://api.openai.com/v1"}});
break; break;
case 'ollama': case 'ollama':
form.setFieldsValue({ model: 'ollama/llama2',api_base: "http://localhost:11434" }); form.resetFields(['llm'])
form.setFieldsValue({"llm": {model: 'ollama/llama2',api_base: "http://localhost:11434" }});
break; break;
default: default:
} }