File tree Expand file tree Collapse file tree 1 file changed +12
-2
lines changed
Expand file tree Collapse file tree 1 file changed +12
-2
lines changed Original file line number Diff line number Diff line change @@ -15,6 +15,16 @@ function getDeepSeekApiKey(): string | null {
1515 return apiKey ;
1616}
1717
18+
19+ const model_name = "deepseek-chat" ;
20+ const apiBaseURL = "https://api.deepseek.com" ;
21+
22+ // const model_name = "deepseek-reasoner";
23+ // const apiBaseURL = "https://api.deepseek.com";
24+
25+ // const model_name = "deepseek-coder-v2";
26+ // const apiBaseURL = "http://10.11.39.58:31084";
27+
1828/**
1929 * 调用 DeepSeek API
2030 * @param userContent 用户输入内容
@@ -39,7 +49,7 @@ async function callDeepSeekApi(
3949 try {
4050 const openai = new OpenAI ( {
4151 apiKey : apiKey ,
42- baseURL : 'https://api.deepseek.com' ,
52+ baseURL : apiBaseURL ,
4353 } ) ;
4454
4555 if ( outputChannel ) {
@@ -58,7 +68,7 @@ async function callDeepSeekApi(
5868 while ( attempts < maxAttempts ) {
5969 attempts ++ ;
6070 const response = await openai . chat . completions . create ( {
61- model : 'deepseek-chat' ,
71+ model : model_name ,
6272 messages : messages_body ,
6373 stream : streamMode ,
6474 max_tokens : 8192 ,
You can’t perform that action at this time.
0 commit comments