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 11import { ProviderAPIConfig } from '../types' ;
22
33export const dashscopeAPIConfig : ProviderAPIConfig = {
4- getBaseURL : ( ) => 'https://dashscope.aliyuncs.com' ,
4+ getBaseURL : ( ) => 'https://dashscope-intl .aliyuncs.com/compatible-mode/v1 ' ,
55 headers ( { providerOptions } ) {
66 const { apiKey } = providerOptions ;
77 return { Authorization : `Bearer ${ apiKey } ` } ;
88 } ,
99 getEndpoint ( { fn } ) {
1010 switch ( fn ) {
1111 case 'chatComplete' :
12- return `/compatible-mode/v1/ chat/completions` ;
12+ return `/chat/completions` ;
1313 case 'embed' :
14- return `/compatible-mode/v1/embeddings` ;
15- case 'rerank' :
16- return `/api/v1/services/rerank/text-rerank/text-rerank` ;
14+ return `/embeddings` ;
1715 default :
1816 return '' ;
1917 }
Original file line number Diff line number Diff line change 66} from '../open-ai-base' ;
77import { ProviderConfigs } from '../types' ;
88import { dashscopeAPIConfig } from './api' ;
9- import { DashScopeRerankConfig } from './rerank' ;
109
1110export const DashScopeConfig : ProviderConfigs = {
1211 chatComplete : chatCompleteParams (
@@ -34,7 +33,6 @@ export const DashScopeConfig: ProviderConfigs = {
3433 }
3534 ) ,
3635 embed : embedParams ( [ ] , { model : 'text-embedding-v1' } ) ,
37- rerank : DashScopeRerankConfig ,
3836 api : dashscopeAPIConfig ,
3937 responseTransforms : responseTransformers ( DASHSCOPE , {
4038 chatComplete : true ,
Load Diff This file was deleted.
You can’t perform that action at this time.
0 commit comments