-
Notifications
You must be signed in to change notification settings - Fork 2.9k
Expand file tree
/
Copy pathmodelProviders.d.ts
More file actions
79 lines (73 loc) · 1.53 KB
/
modelProviders.d.ts
File metadata and controls
79 lines (73 loc) · 1.53 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
/**
* The controller props for settings
*/
type ControllerProps = {
value?: string | boolean | number
placeholder?: string
type?: string
options?: Array<{ value: number | string; name: string }>
input_actions?: string[]
recommended?: string
}
/**
* The setting item for a provider
*/
type ProviderSetting = {
key: string
title: string
description: string
controller_type: 'input' | 'checkbox' | 'dropdown' | 'slider' | string
controller_props: ControllerProps
}
/**
* The model object structure
*/
type Model = {
id: string
model?: string
name?: string
displayName?: string
version?: number | string
description?: string
format?: string
capabilities?: string[]
settings?: Record<string, ProviderSetting>
}
/**
* The provider object structure
*/
type ProviderObject = {
active: boolean
provider: string
explore_models_url?: string
api_key?: string
base_url?: string
settings: ProviderSetting[]
models: Model[]
persist?: boolean
custom_header?: ProviderCustomHeader[] | null
}
/**
* The model provider type
*/
type ModelProvider = ProviderObject
/**
* Proxy configuration options
* @description This type defines the structure of the proxy configuration options.
*/
type ProxyOptions = {
proxyEnabled: boolean
proxyUrl: string
proxyUsername: string
proxyPassword: string
proxyIgnoreSSL: boolean
verifyProxySSL: boolean
verifyProxyHostSSL: boolean
verifyPeerSSL: boolean
verifyHostSSL: boolean
noProxy: string
}
type ProviderCustomHeader = {
header: string
value: string
}