File tree Expand file tree Collapse file tree 2 files changed +17
-14
lines changed Expand file tree Collapse file tree 2 files changed +17
-14
lines changed 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' ;
9
10
10
11
export const DashScopeConfig : ProviderConfigs = {
11
12
chatComplete : chatCompleteParams (
@@ -33,20 +34,7 @@ export const DashScopeConfig: ProviderConfigs = {
33
34
}
34
35
) ,
35
36
embed : embedParams ( [ ] , { model : 'text-embedding-v1' } ) ,
36
- rerank : {
37
- model : {
38
- param : 'model' ,
39
- } ,
40
- query : {
41
- param : 'input.query' ,
42
- } ,
43
- documents : {
44
- param : 'input.documents' ,
45
- } ,
46
- parameters : {
47
- param : 'parameters' ,
48
- } ,
49
- } ,
37
+ rerank : DashScopeRerankConfig ,
50
38
api : dashscopeAPIConfig ,
51
39
responseTransforms : responseTransformers ( DASHSCOPE , {
52
40
chatComplete : true ,
Original file line number Diff line number Diff line change
1
+ // docs: https://help.aliyun.com/zh/model-studio/text-rerank-api
2
+ export const DashScopeRerankConfig = {
3
+ model : {
4
+ param : 'model' ,
5
+ } ,
6
+ query : {
7
+ param : 'input.query' ,
8
+ } ,
9
+ documents : {
10
+ param : 'input.documents' ,
11
+ } ,
12
+ parameters : {
13
+ param : 'parameters' ,
14
+ } ,
15
+ } ;
You can’t perform that action at this time.
0 commit comments