-
Notifications
You must be signed in to change notification settings - Fork 830
Closed
Labels
area-aiMicrosoft.Extensions.AI librariesMicrosoft.Extensions.AI libraries
Description
If a provider has an object representing content for which there's no abstraction, they can use their own AIContent-derived type to represent it. If they don't want to have a public AIContent-derived type, they could just have it be internal, at least exposing the RawRepresentation and AdditionalProperties for the consumer to query. But if they do that, it won't work with Native AOT, as there'd then be no way for the consumer to build knowledge of that AIContent into a JsonSerializerOptions with source generation.
We should consider making AIContent non-abstract and giving it a public instead of protected constructor. Then such a scenario would work, and unknown AIContent could deserialize as the base type.
Metadata
Metadata
Assignees
Labels
area-aiMicrosoft.Extensions.AI librariesMicrosoft.Extensions.AI libraries