File tree 6 files changed +70
-0
lines changed
src/Cnblogs.DashScope.Sdk
6 files changed +70
-0
lines changed Original file line number Diff line number Diff line change @@ -29,6 +29,8 @@ Install `Cnblogs.DashScope.Sdk` package.
29
29
``` csharp
30
30
var client = new DashScopeClient (" your-api-key" );
31
31
var completion = await client .GetQWenCompletionAsync (QWenLlm .QWenMax , prompt );
32
+ // or pass the model name string directly.
33
+ // var completion = await client.GetQWenCompletionAsync("qwen-max", prompt);
32
34
Console .WriteLine (completion .Output .Text );
33
35
```
34
36
Original file line number Diff line number Diff line change @@ -29,6 +29,8 @@ Console.WriteLine(completion)
29
29
``` csharp
30
30
var client = new DashScopeClient (" your-api-key" );
31
31
var completion = await client .GetQWenCompletionAsync (QWenLlm .QWenMax , prompt );
32
+ // 也可以直接输入模型名称进行调用
33
+ // var completion = await client.GetQWenCompletionAsync("qwen-max", prompt);
32
34
Console .WriteLine (completion .Output .Text );
33
35
```
34
36
Original file line number Diff line number Diff line change @@ -94,4 +94,39 @@ public enum QWenLlm
94
94
/// qwen-coder-plus
95
95
/// </summary>
96
96
QWenCoderPlus = 17 ,
97
+
98
+ /// <summary>
99
+ /// qwen-max-latest
100
+ /// </summary>
101
+ QWenMaxLatest = 18 ,
102
+
103
+ /// <summary>
104
+ /// qwen-turbo-latest
105
+ /// </summary>
106
+ QWenTurboLatest = 19 ,
107
+
108
+ /// <summary>
109
+ /// qwen-plus-latest
110
+ /// </summary>
111
+ QWenPlusLatest = 20 ,
112
+
113
+ /// <summary>
114
+ /// qwq-32b-preview
115
+ /// </summary>
116
+ QwQ32BPreview = 21 ,
117
+
118
+ /// <summary>
119
+ /// qwen-math-plus-latest
120
+ /// </summary>
121
+ QWenMathLatest = 22 ,
122
+
123
+ /// <summary>
124
+ /// qwen-coder-plus-latest
125
+ /// </summary>
126
+ QWenCoderPlusLatest = 23 ,
127
+
128
+ /// <summary>
129
+ /// qwen-coder-turbo-latest
130
+ /// </summary>
131
+ QWenCoderTurboLatest = 24 ,
97
132
}
Original file line number Diff line number Diff line change @@ -21,8 +21,15 @@ public static string GetModelName(this QWenLlm llm)
21
21
QWenLlm . QWen1_8Chat => "qwen-1.8b-chat" ,
22
22
QWenLlm . QWenLong => "qwen-long" ,
23
23
QWenLlm . QWenCoderPlus => "qwen-coder-plus" ,
24
+ QWenLlm . QWenCoderPlusLatest => "qwen-coder-plus-latest" ,
24
25
QWenLlm . QWenCoderTurbo => "qwen-coder-turbo" ,
26
+ QWenLlm . QWenCoderTurboLatest => "qwen-coder-turbo-latest" ,
25
27
QWenLlm . QWenMath => "qwen-math-plus" ,
28
+ QWenLlm . QWenMathLatest => "qwen-math-plus-latest" ,
29
+ QWenLlm . QWenMaxLatest => "qwen-max-latest" ,
30
+ QWenLlm . QWenPlusLatest => "qwen-plus-latest" ,
31
+ QWenLlm . QWenTurboLatest => "qwen-turbo-latest" ,
32
+ QWenLlm . QwQ32BPreview => "qwq-32b-preview" ,
26
33
_ => ThrowHelper . UnknownModelName ( nameof ( llm ) , llm )
27
34
} ;
28
35
}
Original file line number Diff line number Diff line change @@ -39,4 +39,24 @@ public enum QWenMultimodalModel
39
39
/// qwen-vl-ocr
40
40
/// </summary>
41
41
QWenVlOcr = 7 ,
42
+
43
+ /// <summary>
44
+ /// qwen-vl-max-latest
45
+ /// </summary>
46
+ QWenVlMaxLatest = 8 ,
47
+
48
+ /// <summary>
49
+ /// qwen-vl-plus-latest
50
+ /// </summary>
51
+ QWenVlPlusLatest = 9 ,
52
+
53
+ /// <summary>
54
+ /// qwen-vl-ocr-latest
55
+ /// </summary>
56
+ QWenVlOcrLatest = 10 ,
57
+
58
+ /// <summary>
59
+ /// qwen-audio-turbo-latest
60
+ /// </summary>
61
+ QWenAudioTurboLatest = 11
42
62
}
Original file line number Diff line number Diff line change @@ -13,6 +13,10 @@ public static string GetModelName(this QWenMultimodalModel multimodalModel)
13
13
QWenMultimodalModel . QWenVlChatV1 => "qwen-vl-chat-v1" ,
14
14
QWenMultimodalModel . QWenAudioChat => "qwen-audio-chat" ,
15
15
QWenMultimodalModel . QWenVlOcr => "qwen-vl-ocr" ,
16
+ QWenMultimodalModel . QWenVlMaxLatest => "qwen-vl-max-latest" ,
17
+ QWenMultimodalModel . QWenVlPlusLatest => "qwen-vl-plus-latest" ,
18
+ QWenMultimodalModel . QWenVlOcrLatest => "qwen-vl-ocr-latest" ,
19
+ QWenMultimodalModel . QWenAudioTurboLatest => "qwen-audio-turbo-latest" ,
16
20
_ => ThrowHelper . UnknownModelName ( nameof ( multimodalModel ) , multimodalModel )
17
21
} ;
18
22
}
You can’t perform that action at this time.
0 commit comments