2026-02-27 18:55:36 +03:00
|
|
|
import type { SectionConfigOverrides } from "./types";
|
|
|
|
|
|
|
|
|
|
const genai: SectionConfigOverrides = {
|
|
|
|
|
base: {
|
2026-06-05 02:07:12 +03:00
|
|
|
sectionDocs: "/configuration/genai/genai_config",
|
2026-03-20 16:24:34 +03:00
|
|
|
advancedFields: ["*.base_url", "*.provider_options", "*.runtime_options"],
|
2026-02-27 18:55:36 +03:00
|
|
|
hiddenFields: ["genai.enabled_in_config"],
|
2026-04-04 15:54:51 +03:00
|
|
|
restartRequired: [],
|
2026-02-27 18:55:36 +03:00
|
|
|
uiSchema: {
|
2026-03-20 16:24:34 +03:00
|
|
|
"ui:options": { disableNestedCard: true },
|
|
|
|
|
"*": {
|
2026-07-12 01:30:40 +03:00
|
|
|
"ui:options": {
|
|
|
|
|
disableNestedCard: true,
|
|
|
|
|
additionalPropertyKeyLabel:
|
|
|
|
|
"configForm.additionalProperties.providerNameLabel",
|
|
|
|
|
additionalPropertyKeyPlaceholder:
|
|
|
|
|
"configForm.additionalProperties.providerNamePlaceholder",
|
|
|
|
|
additionalPropertyKeyPattern: "^[a-zA-Z0-9_-]+$",
|
|
|
|
|
preventKeyRename: true,
|
|
|
|
|
},
|
2026-03-20 16:24:34 +03:00
|
|
|
"ui:order": [
|
|
|
|
|
"provider",
|
|
|
|
|
"api_key",
|
|
|
|
|
"base_url",
|
|
|
|
|
"model",
|
|
|
|
|
"provider_options",
|
|
|
|
|
"runtime_options",
|
|
|
|
|
"*",
|
|
|
|
|
],
|
|
|
|
|
},
|
|
|
|
|
"*.roles": {
|
|
|
|
|
"ui:widget": "genaiRoles",
|
2026-02-27 18:55:36 +03:00
|
|
|
},
|
2026-03-20 16:24:34 +03:00
|
|
|
"*.api_key": {
|
2026-05-21 00:59:01 +03:00
|
|
|
"ui:widget": "password",
|
2026-02-27 18:55:36 +03:00
|
|
|
"ui:options": { size: "lg" },
|
|
|
|
|
},
|
2026-03-20 16:24:34 +03:00
|
|
|
"*.base_url": {
|
|
|
|
|
"ui:options": { size: "lg" },
|
|
|
|
|
},
|
|
|
|
|
"*.model": {
|
2026-04-04 02:13:52 +03:00
|
|
|
"ui:widget": "genaiModel",
|
2026-03-20 16:24:34 +03:00
|
|
|
"ui:options": { size: "xs" },
|
|
|
|
|
},
|
|
|
|
|
"*.provider": {
|
|
|
|
|
"ui:options": { size: "xs" },
|
2026-02-27 18:55:36 +03:00
|
|
|
},
|
2026-03-20 16:24:34 +03:00
|
|
|
"*.provider_options": {
|
2026-04-04 15:54:51 +03:00
|
|
|
"ui:field": "DictAsYamlField",
|
2026-02-27 18:55:36 +03:00
|
|
|
},
|
2026-03-20 16:24:34 +03:00
|
|
|
"*.runtime_options": {
|
2026-04-04 15:54:51 +03:00
|
|
|
"ui:field": "DictAsYamlField",
|
2026-02-27 18:55:36 +03:00
|
|
|
},
|
|
|
|
|
},
|
|
|
|
|
},
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
export default genai;
|