File tree Expand file tree Collapse file tree 3 files changed +3
-22
lines changed Expand file tree Collapse file tree 3 files changed +3
-22
lines changed Original file line number Diff line number Diff line change 1
1
import { ProviderAPIConfig } from '../types' ;
2
2
3
3
export const dashscopeAPIConfig : ProviderAPIConfig = {
4
- getBaseURL : ( ) => 'https://dashscope.aliyuncs.com' ,
4
+ getBaseURL : ( ) => 'https://dashscope-intl .aliyuncs.com/compatible-mode/v1 ' ,
5
5
headers ( { providerOptions } ) {
6
6
const { apiKey } = providerOptions ;
7
7
return { Authorization : `Bearer ${ apiKey } ` } ;
8
8
} ,
9
9
getEndpoint ( { fn } ) {
10
10
switch ( fn ) {
11
11
case 'chatComplete' :
12
- return `/compatible-mode/v1/ chat/completions` ;
12
+ return `/chat/completions` ;
13
13
case 'embed' :
14
- return `/compatible-mode/v1/embeddings` ;
15
- case 'rerank' :
16
- return `/api/v1/services/rerank/text-rerank/text-rerank` ;
14
+ return `/embeddings` ;
17
15
default :
18
16
return '' ;
19
17
}
Original file line number Diff line number Diff line change 6
6
} from '../open-ai-base' ;
7
7
import { ProviderConfigs } from '../types' ;
8
8
import { dashscopeAPIConfig } from './api' ;
9
- import { DashScopeRerankConfig } from './rerank' ;
10
9
11
10
export const DashScopeConfig : ProviderConfigs = {
12
11
chatComplete : chatCompleteParams (
@@ -34,7 +33,6 @@ export const DashScopeConfig: ProviderConfigs = {
34
33
}
35
34
) ,
36
35
embed : embedParams ( [ ] , { model : 'text-embedding-v1' } ) ,
37
- rerank : DashScopeRerankConfig ,
38
36
api : dashscopeAPIConfig ,
39
37
responseTransforms : responseTransformers ( DASHSCOPE , {
40
38
chatComplete : true ,
Load Diff This file was deleted.
You can’t perform that action at this time.
0 commit comments