返回 oh-my-ppt
types.ts
根目录 / src / renderer / src / components / settings / types.ts
1 import type { ConfigurableModelTimeoutProfile } from '@shared/model-timeout.js'
2 import type { ThinkingParameterMode } from '@shared/model-config.js'
3 import type { I18nKey, TranslationParams } from '../../i18n'
4 import type { ImageModelProvider } from '../../lib/ipc'
5
6 export type ProviderId = 'anthropic' | 'openai' | 'openai-responses' | 'google'
7
8 export type SettingsTranslate = (key: I18nKey, params?: TranslationParams) => string
9
10 export interface ModelForm {
11 id?: string
12 name: string
13 provider: ProviderId
14 model: string
15 apiKey: string
16 baseUrl: string
17 maxTokens: string
18 disableTemperature: boolean
19 thinkingParameterMode: ThinkingParameterMode
20 active: boolean
21 }
22
23 export interface ImageModelForm {
24 id?: string
25 name: string
26 provider: ImageModelProvider
27 modelConfig: string
28 active: boolean
29 }
30
31 export interface TimeoutField {
32 profile: ConfigurableModelTimeoutProfile
33 label: string
34 hint: string
35 min: number
36 }
37
37 lines TYPESCRIPT