Compartir a través de


AIContent Class

Definition

Provides a base class for all content used with AI services.

public ref class AIContent
[System.Text.Json.Serialization.JsonDerivedType(typeof(Microsoft.Extensions.AI.DataContent), "data")]
[System.Text.Json.Serialization.JsonDerivedType(typeof(Microsoft.Extensions.AI.FunctionCallContent), "functionCall")]
[System.Text.Json.Serialization.JsonDerivedType(typeof(Microsoft.Extensions.AI.FunctionResultContent), "functionResult")]
[System.Text.Json.Serialization.JsonDerivedType(typeof(Microsoft.Extensions.AI.TextContent), "text")]
[System.Text.Json.Serialization.JsonDerivedType(typeof(Microsoft.Extensions.AI.UsageContent), "usage")]
[System.Text.Json.Serialization.JsonPolymorphic(TypeDiscriminatorPropertyName="$type")]
public class AIContent
[<System.Text.Json.Serialization.JsonDerivedType(typeof(Microsoft.Extensions.AI.DataContent), "data")>]
[<System.Text.Json.Serialization.JsonDerivedType(typeof(Microsoft.Extensions.AI.FunctionCallContent), "functionCall")>]
[<System.Text.Json.Serialization.JsonDerivedType(typeof(Microsoft.Extensions.AI.FunctionResultContent), "functionResult")>]
[<System.Text.Json.Serialization.JsonDerivedType(typeof(Microsoft.Extensions.AI.TextContent), "text")>]
[<System.Text.Json.Serialization.JsonDerivedType(typeof(Microsoft.Extensions.AI.UsageContent), "usage")>]
[<System.Text.Json.Serialization.JsonPolymorphic(TypeDiscriminatorPropertyName="$type")>]
type AIContent = class
Public Class AIContent
Inheritance
AIContent
Derived
Attributes

Constructors

AIContent()

Initializes a new instance of the AIContent class.

Properties

AdditionalProperties

Gets or sets additional properties for the content.

RawRepresentation

Gets or sets the raw representation of the content from an underlying implementation.

Applies to