Class InteractionContent
- Namespace
- GenerativeAI.Types
- Assembly
- GenerativeAI.dll
A content block of the Interactions API (text, image, audio, video or document), discriminated by type.
Unknown content types are read as UnknownInteractionContent.
[JsonConverter(typeof(InteractionContentConverter))]
public abstract class InteractionContent
- Inheritance
-
InteractionContent
- Derived
- Inherited Members
- Extension Methods
Constructors
InteractionContent(string)
Initializes a new content block with the given discriminator.
protected InteractionContent(string type)
Parameters
typestringThe
typediscriminator.
Properties
ExtensionData
Fields returned by the API that this SDK does not model yet.
[JsonExtensionData]
public Dictionary<string, JsonElement>? ExtensionData { get; set; }
Property Value
Type
The content type discriminator (see InteractionContentTypes).
[JsonPropertyName("type")]
public string Type { get; }
Property Value
Methods
FromText(string)
Creates a text content block.
public static InteractionTextContent FromText(string text)
Parameters
textstringThe text.