Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: add vl latestest modal names #56

Merged
merged 2 commits into from
Dec 14, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading