Skip to content

Commit 8fbeca0

Browse files
authored
Add missing [JsonIgnore] on ChatCompletion.Message (#5552)
This property is an accelerator into Choices. It's already serialized as part of Choices and shouldn't be duplicated.
1 parent ccd86d9 commit 8fbeca0

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

src/Libraries/Microsoft.Extensions.AI.Abstractions/ChatCompletion/ChatCompletion.cs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -42,6 +42,7 @@ public IList<ChatMessage> Choices
4242
/// If there are multiple choices, this property returns the first choice.
4343
/// If <see cref="Choices"/> is empty, this will throw. Use <see cref="Choices"/> to access all choices directly."/>.
4444
/// </remarks>
45+
[JsonIgnore]
4546
public ChatMessage Message
4647
{
4748
get

0 commit comments

Comments
 (0)