update to new config format

This commit is contained in:
bobo.yang 2023-09-13 10:08:16 +08:00
parent 650281059c
commit 40803aa635

View File

@ -232,16 +232,16 @@ class DevChat {
obj[key] = llmModelData[key]; obj[key] = llmModelData[key];
return obj; return obj;
}, {}); }, {});
let devchatConfig = { let devchatConfig = {};
"id": llmModelData.model, devchatConfig[llmModelData.model] = {
"provider": llmModelData.provider, "provider": llmModelData.provider,
"parameters": { "stream": openaiStream,
"stream": openaiStream, ...reduceModelData
...reduceModelData
}
}; };
let devchatModels = {"models": [devchatConfig]}; let devchatModels = {
"default_model": llmModelData.model,
"models": devchatConfig};
// write to config file // write to config file
const os = process.platform; const os = process.platform;