markqiu commited on
Commit
2baa0b9
1 Parent(s): 1717121

调试qianfan成功,支持qianfan所有模型

Browse files
Files changed (2) hide show
  1. modules/models/base_model.py +1 -1
  2. modules/presets.py +26 -9
modules/models/base_model.py CHANGED
@@ -194,7 +194,7 @@ class ModelType(Enum):
194
  model_type = ModelType.Claude
195
  elif "qwen" in model_name_lower:
196
  model_type = ModelType.Qwen
197
- elif "ernie" in model_name_lower:
198
  model_type = ModelType.ERNIE
199
  elif "dall" in model_name_lower:
200
  model_type = ModelType.DALLE3
 
194
  model_type = ModelType.Claude
195
  elif "qwen" in model_name_lower:
196
  model_type = ModelType.Qwen
197
+ elif "ernie" in model_name_lower or "xuanyuan" in model_name_lower:
198
  model_type = ModelType.ERNIE
199
  elif "dall" in model_name_lower:
200
  model_type = ModelType.DALLE3
modules/presets.py CHANGED
@@ -84,9 +84,22 @@ ONLINE_MODELS = [
84
  "讯飞星火大模型V2.0",
85
  "讯飞星火大模型V1.5",
86
  "Claude",
87
- "ernie-bot-turbo",
88
- "ernie-bot",
89
- "ernie-bot-4",
 
 
 
 
 
 
 
 
 
 
 
 
 
90
  ]
91
 
92
  LOCAL_MODELS = [
@@ -164,16 +177,20 @@ MODEL_METADATA = {
164
  "model_name": "Claude",
165
  "token_limit": 4096,
166
  },
167
- "ernie-bot-turbo": {
168
- "model_name": "ernie-bot-turbo",
169
  "token_limit": 3000,
170
  },
171
- "ernie-bot": {
172
- "model_name": "ernie-bot",
173
  "token_limit": 3000,
174
  },
175
- "ernie-bot-4": {
176
- "model_name": "ernie-bot-4",
 
 
 
 
177
  "token_limit": 3000,
178
  },
179
  }
 
84
  "讯飞星火大模型V2.0",
85
  "讯飞星火大模型V1.5",
86
  "Claude",
87
+ 'XuanYuan-70B-Chat-'
88
+ 'Qianfan-BLOOMZ-7B-compressed',
89
+ 'ChatGLM2-6B-32K',
90
+ 'Llama-2-7b-chat',
91
+ 'Llama-2-70b-chat',
92
+ 'Qianfan-Chinese-Llama-2-7B',
93
+ 'ERNIE-Bot-8k',
94
+ 'ERNIE-Bot-turbo',
95
+ 'ERNIE-Bot',
96
+ 'ERNIE-Bot-turbo-AI',
97
+ 'AquilaChat-7B',
98
+ 'Qianfan-Chinese-Llama-2-13B',
99
+ 'ERNIE-Bot-4',
100
+ 'Llama-2-13b-chat',
101
+ 'XuanYuan-70B-Chat-4bit',
102
+ 'BLOOMZ-7B',
103
  ]
104
 
105
  LOCAL_MODELS = [
 
177
  "model_name": "Claude",
178
  "token_limit": 4096,
179
  },
180
+ "ERNIE-Bot-turbo": {
181
+ "model_name": "ERNIE-Bot-turbo",
182
  "token_limit": 3000,
183
  },
184
+ "ERNIE-Bot": {
185
+ "model_name": "ERNIE-Bot",
186
  "token_limit": 3000,
187
  },
188
+ "ERNIE-Bot-4": {
189
+ "model_name": "ERNIE-Bot-4",
190
+ "token_limit": 3000,
191
+ },
192
+ "XuanYuan-70B-Chat-4bit": {
193
+ "model_name": "XuanYuan-70B-Chat-4bit",
194
  "token_limit": 3000,
195
  },
196
  }