File tree Expand file tree Collapse file tree 6 files changed +70
-0
lines changed
src/Cnblogs.DashScope.Sdk Expand file tree Collapse file tree 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.
2929``` csharp
3030var client = new DashScopeClient (" your-api-key" );
3131var completion = await client .GetQWenCompletionAsync (QWenLlm .QWenMax , prompt );
32+ // or pass the model name string directly.
33+ // var completion = await client.GetQWenCompletionAsync("qwen-max", prompt);
3234Console .WriteLine (completion .Output .Text );
3335```
3436
Original file line number Diff line number Diff line change @@ -29,6 +29,8 @@ Console.WriteLine(completion)
2929``` csharp
3030var client = new DashScopeClient (" your-api-key" );
3131var completion = await client .GetQWenCompletionAsync (QWenLlm .QWenMax , prompt );
32+ // 也可以直接输入模型名称进行调用
33+ // var completion = await client.GetQWenCompletionAsync("qwen-max", prompt);
3234Console .WriteLine (completion .Output .Text );
3335```
3436
Original file line number Diff line number Diff line change @@ -94,4 +94,39 @@ public enum QWenLlm
9494 /// qwen-coder-plus
9595 /// </summary>
9696 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 ,
97132}
Original file line number Diff line number Diff line change @@ -21,8 +21,15 @@ public static string GetModelName(this QWenLlm llm)
2121 QWenLlm . QWen1_8Chat => "qwen-1.8b-chat" ,
2222 QWenLlm . QWenLong => "qwen-long" ,
2323 QWenLlm . QWenCoderPlus => "qwen-coder-plus" ,
24+ QWenLlm . QWenCoderPlusLatest => "qwen-coder-plus-latest" ,
2425 QWenLlm . QWenCoderTurbo => "qwen-coder-turbo" ,
26+ QWenLlm . QWenCoderTurboLatest => "qwen-coder-turbo-latest" ,
2527 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" ,
2633 _ => ThrowHelper . UnknownModelName ( nameof ( llm ) , llm )
2734 } ;
2835 }
Original file line number Diff line number Diff line change @@ -39,4 +39,24 @@ public enum QWenMultimodalModel
3939 /// qwen-vl-ocr
4040 /// </summary>
4141 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
4262}
Original file line number Diff line number Diff line change @@ -13,6 +13,10 @@ public static string GetModelName(this QWenMultimodalModel multimodalModel)
1313 QWenMultimodalModel . QWenVlChatV1 => "qwen-vl-chat-v1" ,
1414 QWenMultimodalModel . QWenAudioChat => "qwen-audio-chat" ,
1515 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" ,
1620 _ => ThrowHelper . UnknownModelName ( nameof ( multimodalModel ) , multimodalModel )
1721 } ;
1822 }
You can’t perform that action at this time.
0 commit comments