@@ -165,9 +165,24 @@ def get_llm_model(provider: str, **kwargs):
165
165
return ChatOpenAI (
166
166
model = kwargs .get ("model_name" , "gpt-4o-mini" ),
167
167
temperature = kwargs .get ("temperature" , 0.0 ),
168
- base_url = os .getenv ("UNBOUND_ENDPOINT" , "https://api.getunbound.ai" ),
168
+ base_url = os .getenv ("UNBOUND_ENDPOINT" , "https://api.getunbound.ai" ),
169
169
api_key = api_key ,
170
170
)
171
+ elif provider == "siliconflow" :
172
+ if not kwargs .get ("api_key" , "" ):
173
+ api_key = os .getenv ("SiliconFLOW_API_KEY" , "" )
174
+ else :
175
+ api_key = kwargs .get ("api_key" )
176
+ if not kwargs .get ("base_url" , "" ):
177
+ base_url = os .getenv ("SiliconFLOW_ENDPOINT" , "" )
178
+ else :
179
+ base_url = kwargs .get ("base_url" )
180
+ return ChatOpenAI (
181
+ api_key = api_key ,
182
+ base_url = base_url ,
183
+ model_name = kwargs .get ("model_name" , "Qwen/QwQ-32B" ),
184
+ temperature = kwargs .get ("temperature" , 0.0 ),
185
+ )
171
186
else :
172
187
raise ValueError (f"Unsupported provider: { provider } " )
173
188
@@ -185,7 +200,40 @@ def get_llm_model(provider: str, **kwargs):
185
200
"mistral" : ["pixtral-large-latest" , "mistral-large-latest" , "mistral-small-latest" , "ministral-8b-latest" ],
186
201
"alibaba" : ["qwen-plus" , "qwen-max" , "qwen-turbo" , "qwen-long" ],
187
202
"moonshot" : ["moonshot-v1-32k-vision-preview" , "moonshot-v1-8k-vision-preview" ],
188
- "unbound" : ["gemini-2.0-flash" ,"gpt-4o-mini" , "gpt-4o" , "gpt-4.5-preview" ]
203
+ "unbound" : ["gemini-2.0-flash" , "gpt-4o-mini" , "gpt-4o" , "gpt-4.5-preview" ],
204
+ "siliconflow" : [
205
+ "deepseek-ai/DeepSeek-R1" ,
206
+ "deepseek-ai/DeepSeek-V3" ,
207
+ "deepseek-ai/DeepSeek-R1-Distill-Qwen-32B" ,
208
+ "deepseek-ai/DeepSeek-R1-Distill-Qwen-14B" ,
209
+ "deepseek-ai/DeepSeek-R1-Distill-Qwen-7B" ,
210
+ "deepseek-ai/DeepSeek-R1-Distill-Qwen-1.5B" ,
211
+ "deepseek-ai/DeepSeek-V2.5" ,
212
+ "deepseek-ai/deepseek-vl2" ,
213
+ "Qwen/Qwen2.5-72B-Instruct-128K" ,
214
+ "Qwen/Qwen2.5-72B-Instruct" ,
215
+ "Qwen/Qwen2.5-32B-Instruct" ,
216
+ "Qwen/Qwen2.5-14B-Instruct" ,
217
+ "Qwen/Qwen2.5-7B-Instruct" ,
218
+ "Qwen/Qwen2.5-Coder-32B-Instruct" ,
219
+ "Qwen/Qwen2.5-Coder-7B-Instruct" ,
220
+ "Qwen/Qwen2-7B-Instruct" ,
221
+ "Qwen/Qwen2-1.5B-Instruct" ,
222
+ "Qwen/QwQ-32B-Preview" ,
223
+ "Qwen/Qwen2-VL-72B-Instruct" ,
224
+ "Qwen/Qwen2.5-VL-32B-Instruct" ,
225
+ "Qwen/Qwen2.5-VL-72B-Instruct" ,
226
+ "TeleAI/TeleChat2" ,
227
+ "THUDM/glm-4-9b-chat" ,
228
+ "Vendor-A/Qwen/Qwen2.5-72B-Instruct" ,
229
+ "internlm/internlm2_5-7b-chat" ,
230
+ "internlm/internlm2_5-20b-chat" ,
231
+ "Pro/Qwen/Qwen2.5-7B-Instruct" ,
232
+ "Pro/Qwen/Qwen2-7B-Instruct" ,
233
+ "Pro/Qwen/Qwen2-1.5B-Instruct" ,
234
+ "Pro/THUDM/chatglm3-6b" ,
235
+ "Pro/THUDM/glm-4-9b-chat" ,
236
+ ],
189
237
}
190
238
191
239
0 commit comments