Skip to content

Commit

Permalink
Merge pull request #56 from cnblogs/add-vl-latestest-modal-names
Browse files Browse the repository at this point in the history
feat: add vl latestest modal names
  • Loading branch information
ikesnowy authored Dec 14, 2024
2 parents 9f820fa + c85b430 commit 9536174
Show file tree
Hide file tree
Showing 6 changed files with 70 additions and 0 deletions.
2 changes: 2 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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);
```

Expand Down
2 changes: 2 additions & 0 deletions README.zh-Hans.md
Original file line number Diff line number Diff line change
Expand Up @@ -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);
```

Expand Down
35 changes: 35 additions & 0 deletions src/Cnblogs.DashScope.Sdk/QWen/QWenLlm.cs
Original file line number Diff line number Diff line change
Expand Up @@ -94,4 +94,39 @@ public enum QWenLlm
/// qwen-coder-plus
/// </summary>
QWenCoderPlus = 17,

/// <summary>
/// qwen-max-latest
/// </summary>
QWenMaxLatest = 18,

/// <summary>
/// qwen-turbo-latest
/// </summary>
QWenTurboLatest = 19,

/// <summary>
/// qwen-plus-latest
/// </summary>
QWenPlusLatest = 20,

/// <summary>
/// qwq-32b-preview
/// </summary>
QwQ32BPreview = 21,

/// <summary>
/// qwen-math-plus-latest
/// </summary>
QWenMathLatest = 22,

/// <summary>
/// qwen-coder-plus-latest
/// </summary>
QWenCoderPlusLatest = 23,

/// <summary>
/// qwen-coder-turbo-latest
/// </summary>
QWenCoderTurboLatest = 24,
}
7 changes: 7 additions & 0 deletions src/Cnblogs.DashScope.Sdk/QWen/QWenLlmNames.cs
Original file line number Diff line number Diff line change
Expand Up @@ -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)
};
}
Expand Down
20 changes: 20 additions & 0 deletions src/Cnblogs.DashScope.Sdk/QWenMultimodal/QWenMultimodalModel.cs
Original file line number Diff line number Diff line change
Expand Up @@ -39,4 +39,24 @@ public enum QWenMultimodalModel
/// qwen-vl-ocr
/// </summary>
QWenVlOcr = 7,

/// <summary>
/// qwen-vl-max-latest
/// </summary>
QWenVlMaxLatest = 8,

/// <summary>
/// qwen-vl-plus-latest
/// </summary>
QWenVlPlusLatest = 9,

/// <summary>
/// qwen-vl-ocr-latest
/// </summary>
QWenVlOcrLatest = 10,

/// <summary>
/// qwen-audio-turbo-latest
/// </summary>
QWenAudioTurboLatest = 11
}
Original file line number Diff line number Diff line change
Expand Up @@ -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)
};
}
Expand Down

0 comments on commit 9536174

Please sign in to comment.