refactor: auto-generate model role from model name[provider name] format
This commit is contained in:
1 parent
b01a5661b4
commit
a394e5f730
2 files changed
+7
-17
No files matched your search
+2
-5
@@ -391,10 +391,7 @@ export default function App() {
|
||||
});
|
||||
}}
|
||||
onModelAdd={() => {
|
||||
const providerModels = Object.values(config.models).filter(
|
||||
(m) => m.provider === currentProvider.name
|
||||
);
|
||||
const alias = `${currentProvider.name}-${providerModels.length + 1}`;
|
||||
const alias = `新模型[${currentProvider.name}]`;
|
||||
updateConfig((cfg) => ({
|
||||
...cfg,
|
||||
models: {
|
||||
@@ -405,7 +402,7 @@ export default function App() {
|
||||
model: "",
|
||||
max_context_size: getDefaultMaxContextSize(alias),
|
||||
display_name: null,
|
||||
role: null,
|
||||
role: `新模型[${currentProvider.name}]`,
|
||||
supports_1m: false,
|
||||
capabilities: [],
|
||||
},
|
||||
|
||||
Reference in new issue
Block a user