forked from AI-QL/tuui
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathindex.ts
More file actions
91 lines (73 loc) · 1.92 KB
/
index.ts
File metadata and controls
91 lines (73 loc) · 1.92 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
80
81
82
83
84
85
86
87
88
89
90
91
export interface ChatbotConfig {
name: string
apiKey: string
apiCli: string
url: string
urlList: string[]
path: string
pathList: string[]
model: string
modelList: string[]
authPrefix: string
authPrefixList: string[]
maxTokensType: string
maxTokensTypeList: string[]
maxTokensPrefix: string
maxTokensValue: string
temperature: string
topP: string
method: string
contentType: string
stream: boolean
mcp: boolean
}
export const CHATBOT_DEFAULTS = {
name: '',
apiKey: '',
apiCli: '',
url: 'https://ai.aiql.com',
urlList: ['https://ai.aiql.com'],
path: '/v1/chat/completions',
pathList: [
'/chat/completions',
'/v1/chat/completions',
'/v1/openai/chat/completions',
'/openai/v1/chat/completions'
],
model: 'meta-llama/Llama-3.3-70B-Instruct',
modelList: ['meta-llama/Llama-3.3-70B-Instruct'],
authPrefix: 'Bearer',
authPrefixList: ['Bearer', 'Base', 'Token'],
maxTokensType: 'max_tokens',
maxTokensTypeList: ['max_tokens', 'max_completion_tokens', 'max_new_tokens'],
maxTokensPrefix: 'max_tokens',
maxTokensValue: '',
temperature: '',
topP: '',
method: 'POST',
contentType: 'application/json',
stream: true,
mcp: true
}
export const CHATBOT_QWEN = {
url: 'https://dashscope.aliyuncs.com/compatible-mode',
urlList: ['https://dashscope.aliyuncs.com/compatible-mode'],
name: 'Qwen',
model: 'qwen-turbo',
modelList: ['qwen-turbo', 'qwen-plus', 'qwen-max']
}
export const CHATBOT_OPENAI = {
url: 'https://api.openai.com',
urlList: ['https://api.openai.com', 'https://api.aiql.com'],
name: 'OpenAI & Proxy',
model: 'gpt-4-turbo',
modelList: ['gpt-4-turbo', 'gpt-4.1', 'gpt-4o', 'o1']
}
export const CHATBOT_DEEPINFRA = {
url: 'https://api.deepinfra.com',
urlList: ['https://api.deepinfra.com'],
path: '/v1/openai/chat/completions',
name: 'DeepInfra',
model: 'gpt-4-turbo',
modelList: ['gpt-4-turbo', 'gpt-4.1', 'gpt-4o', 'o1']
}