diff --git a/webui/src/components/setting/config-experimental.vue b/webui/src/components/setting/config-openai.vue similarity index 83% rename from webui/src/components/setting/config-experimental.vue rename to webui/src/components/setting/config-openai.vue index a0f84f15..2b34ad91 100644 --- a/webui/src/components/setting/config-experimental.vue +++ b/webui/src/components/setting/config-openai.vue @@ -1,12 +1,13 @@ @@ -46,12 +50,13 @@ const items: SettingItem[] = [ {{ $t('config.experimental_openai_set.warning') }} +
diff --git a/webui/src/pages/index/config.vue b/webui/src/pages/index/config.vue index afc5fd14..629e9af6 100644 --- a/webui/src/pages/index/config.vue +++ b/webui/src/pages/index/config.vue @@ -29,14 +29,14 @@ definePage({ - +
- {{ - $t('config.cancel') - }} + + {{ $t('config.cancel') }} + {{ $t('config.apply') }}
diff --git a/webui/types/config.ts b/webui/types/config.ts index 8b2327c0..c9f65026 100644 --- a/webui/types/config.ts +++ b/webui/types/config.ts @@ -51,7 +51,7 @@ export interface Config { enable: boolean; api_key: string; api_base: string; - model: string; + model: 'gpt-3.5-turbo'; }; } @@ -135,3 +135,5 @@ export type RenameMethod = UnionToTuple; export type ProxyType = UnionToTuple; /** 通知类型 */ export type NotificationType = UnionToTuple; +/** OpenAI Model List */ +export type OpenAIModel = UnionToTuple; diff --git a/webui/types/dts/components.d.ts b/webui/types/dts/components.d.ts index 12def335..4bfca136 100644 --- a/webui/types/dts/components.d.ts +++ b/webui/types/dts/components.d.ts @@ -38,6 +38,7 @@ declare module '@vue/runtime-core' { ConfigManage: typeof import('./../../src/components/setting/config-manage.vue')['default'] ConfigNormal: typeof import('./../../src/components/setting/config-normal.vue')['default'] ConfigNotification: typeof import('./../../src/components/setting/config-notification.vue')['default'] + ConfigOpenai: typeof import('./../../src/components/setting/config-openai.vue')['default'] ConfigParser: typeof import('./../../src/components/setting/config-parser.vue')['default'] ConfigPlayer: typeof import('./../../src/components/setting/config-player.vue')['default'] ConfigProxy: typeof import('./../../src/components/setting/config-proxy.vue')['default'] diff --git a/webui/types/dts/router-type.d.ts b/webui/types/dts/router-type.d.ts index 66ba5cf1..d632ccb8 100644 --- a/webui/types/dts/router-type.d.ts +++ b/webui/types/dts/router-type.d.ts @@ -42,7 +42,7 @@ declare module 'vue-router/auto/routes' { 'Index': RouteRecordInfo<'Index', '/', Record, Record>, 'Bangumi List': RouteRecordInfo<'Bangumi List', '/bangumi', Record, Record>, 'Calendar': RouteRecordInfo<'Calendar', '/calendar', Record, Record>, - 'Config': RouteRecordInfo<'Config', '/config', Record, Record>, + '//config': RouteRecordInfo<'//config', '/config', Record, Record>, 'Downloader': RouteRecordInfo<'Downloader', '/downloader', Record, Record>, 'Log': RouteRecordInfo<'Log', '/log', Record, Record>, 'Player': RouteRecordInfo<'Player', '/player', Record, Record>,