diff --git a/README.md b/README.md index 07ecba8..efd74b1 100644 --- a/README.md +++ b/README.md @@ -29,6 +29,8 @@ Install `Cnblogs.DashScope.Sdk` package. ```csharp var client = new DashScopeClient("your-api-key"); var completion = await client.GetQWenCompletionAsync(QWenLlm.QWenMax, prompt); +// or pass the model name string directly. +// var completion = await client.GetQWenCompletionAsync("qwen-max", prompt); Console.WriteLine(completion.Output.Text); ``` diff --git a/README.zh-Hans.md b/README.zh-Hans.md index 9f046be..9f81d6b 100644 --- a/README.zh-Hans.md +++ b/README.zh-Hans.md @@ -29,6 +29,8 @@ Console.WriteLine(completion) ```csharp var client = new DashScopeClient("your-api-key"); var completion = await client.GetQWenCompletionAsync(QWenLlm.QWenMax, prompt); +// 也可以直接输入模型名称进行调用 +// var completion = await client.GetQWenCompletionAsync("qwen-max", prompt); Console.WriteLine(completion.Output.Text); ``` diff --git a/src/Cnblogs.DashScope.Sdk/QWen/QWenLlm.cs b/src/Cnblogs.DashScope.Sdk/QWen/QWenLlm.cs index f7bdf6e..6a55c06 100644 --- a/src/Cnblogs.DashScope.Sdk/QWen/QWenLlm.cs +++ b/src/Cnblogs.DashScope.Sdk/QWen/QWenLlm.cs @@ -94,4 +94,39 @@ public enum QWenLlm /// qwen-coder-plus /// QWenCoderPlus = 17, + + /// + /// qwen-max-latest + /// + QWenMaxLatest = 18, + + /// + /// qwen-turbo-latest + /// + QWenTurboLatest = 19, + + /// + /// qwen-plus-latest + /// + QWenPlusLatest = 20, + + /// + /// qwq-32b-preview + /// + QwQ32BPreview = 21, + + /// + /// qwen-math-plus-latest + /// + QWenMathLatest = 22, + + /// + /// qwen-coder-plus-latest + /// + QWenCoderPlusLatest = 23, + + /// + /// qwen-coder-turbo-latest + /// + QWenCoderTurboLatest = 24, } diff --git a/src/Cnblogs.DashScope.Sdk/QWen/QWenLlmNames.cs b/src/Cnblogs.DashScope.Sdk/QWen/QWenLlmNames.cs index fd2ba98..6e09718 100644 --- a/src/Cnblogs.DashScope.Sdk/QWen/QWenLlmNames.cs +++ b/src/Cnblogs.DashScope.Sdk/QWen/QWenLlmNames.cs @@ -21,8 +21,15 @@ public static string GetModelName(this QWenLlm llm) QWenLlm.QWen1_8Chat => "qwen-1.8b-chat", QWenLlm.QWenLong => "qwen-long", QWenLlm.QWenCoderPlus => "qwen-coder-plus", + QWenLlm.QWenCoderPlusLatest => "qwen-coder-plus-latest", QWenLlm.QWenCoderTurbo => "qwen-coder-turbo", + QWenLlm.QWenCoderTurboLatest => "qwen-coder-turbo-latest", QWenLlm.QWenMath => "qwen-math-plus", + QWenLlm.QWenMathLatest => "qwen-math-plus-latest", + QWenLlm.QWenMaxLatest => "qwen-max-latest", + QWenLlm.QWenPlusLatest => "qwen-plus-latest", + QWenLlm.QWenTurboLatest => "qwen-turbo-latest", + QWenLlm.QwQ32BPreview => "qwq-32b-preview", _ => ThrowHelper.UnknownModelName(nameof(llm), llm) }; } diff --git a/src/Cnblogs.DashScope.Sdk/QWenMultimodal/QWenMultimodalModel.cs b/src/Cnblogs.DashScope.Sdk/QWenMultimodal/QWenMultimodalModel.cs index 09b59cc..fa65480 100644 --- a/src/Cnblogs.DashScope.Sdk/QWenMultimodal/QWenMultimodalModel.cs +++ b/src/Cnblogs.DashScope.Sdk/QWenMultimodal/QWenMultimodalModel.cs @@ -39,4 +39,24 @@ public enum QWenMultimodalModel /// qwen-vl-ocr /// QWenVlOcr = 7, + + /// + /// qwen-vl-max-latest + /// + QWenVlMaxLatest = 8, + + /// + /// qwen-vl-plus-latest + /// + QWenVlPlusLatest = 9, + + /// + /// qwen-vl-ocr-latest + /// + QWenVlOcrLatest = 10, + + /// + /// qwen-audio-turbo-latest + /// + QWenAudioTurboLatest = 11 } diff --git a/src/Cnblogs.DashScope.Sdk/QWenMultimodal/QWenMultimodalModelNames.cs b/src/Cnblogs.DashScope.Sdk/QWenMultimodal/QWenMultimodalModelNames.cs index 5ed7140..b5bd02a 100644 --- a/src/Cnblogs.DashScope.Sdk/QWenMultimodal/QWenMultimodalModelNames.cs +++ b/src/Cnblogs.DashScope.Sdk/QWenMultimodal/QWenMultimodalModelNames.cs @@ -13,6 +13,10 @@ public static string GetModelName(this QWenMultimodalModel multimodalModel) QWenMultimodalModel.QWenVlChatV1 => "qwen-vl-chat-v1", QWenMultimodalModel.QWenAudioChat => "qwen-audio-chat", QWenMultimodalModel.QWenVlOcr => "qwen-vl-ocr", + QWenMultimodalModel.QWenVlMaxLatest => "qwen-vl-max-latest", + QWenMultimodalModel.QWenVlPlusLatest => "qwen-vl-plus-latest", + QWenMultimodalModel.QWenVlOcrLatest => "qwen-vl-ocr-latest", + QWenMultimodalModel.QWenAudioTurboLatest => "qwen-audio-turbo-latest", _ => ThrowHelper.UnknownModelName(nameof(multimodalModel), multimodalModel) }; }