[Bug]: Exception when calling GetResponseAsync
メンテナーはふだん 1 日以内に返信
まだ誰も着手していません。
評価
- 難易度
- 2/5
- 見積もり時間
- 1〜3時間
- 初心者へのやさしさ
- 72/100
調査の方向性
GetResponseAsync のシリアル化パスから開始し、HuggingFace.ChatRequest に対する SourceGenerationContext の処理を調査します。Issue にある Qwen/Qwen2.5-Coder-32B-Instruct のリクエストを再現し、その後、JsonTypeInfo 例外なしで正常なレスポンスが返ることを確認します。
索引モデルが issue の本文から書いたものです。
説明
Summary
Calling GetResponseAsync throws an exception.
Affected area
Serialization
NuGet package version
4.2
.NET version
10
Endpoint or model
Qwen/Qwen2.5-Coder-32B-Instruct
Minimal reproduction
using var client = new HuggingFaceInferenceClient("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");
IChatClient chatClient = client;
var response = await chatClient.GetResponseAsync(
[new(ChatRole.User, "Say hello in one word.")],
new ChatOptions { ModelId = "Qwen/Qwen2.5-Coder-32B-Instruct", MaxOutputTokens = 32 });
Actual behavior
System.InvalidOperationException: 'JsonTypeInfo metadata for type 'HuggingFace.ChatRequest' was not provided by TypeInfoResolver of type 'HuggingFace.SourceGenerationContext'. If using source generation, ensure that all root types passed to the serializer have been annotated with 'JsonSerializableAttribute', along with any types that might be serialized polymorphically.'
Expected behavior
I get a proper response
Logs or request/response details
Operating system
Windows 11
Additional context
No response
Confirmations
- I searched existing issues for duplicates.
- I removed API keys, credentials, and other sensitive data.
- 主要言語
- C#
- スター
- 58
- フォーク
- 9
- 平均マージ
- 22分
- マージ済み PR(30日)
- 133
環境構築
- Dockerfile・Docker Compose ファイルなし
- プルリクエストのテンプレートなし
- コントリビューションガイドを読む
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
似ている issue
-
area-ai untriaged
難易度 2/5 1〜3時間 初心者へのやさしさ 85/100
dotnet/extensions#7790 ·
メンテナーはふだん 1 日以内に返信
-
P2 testing
難易度 1/5 1時間未満 初心者へのやさしさ 90/100
メンテナーはふだん 1 日以内に返信
-
area-Infrastructure-coreclr os-ios os-maccatalyst os-tvos untriaged
難易度 2/5 1〜3時間 初心者へのやさしさ 78/100
dotnet/runtime#134766 · コメント 3 件 ·
メンテナーはふだん 1 日以内に返信
-
0 - Backlog Bug
難易度 2/5 1〜3時間 初心者へのやさしさ 88/100
BrighterCommand/Brighter#4444 ·
メンテナーはふだん 1 日以内に返信
-
bug
難易度 2/5 1〜3時間 初心者へのやさしさ 88/100
メンテナーはふだん 1 日以内に返信