DecisionFilePart
Namespace: E2E.Decision.Sdk
public sealed record DecisionFilePart : DecisionStatePart, IEquatable<DecisionStatePart>, IEquatable<DecisionFilePart>A file, such as a screenshot, as bytes with its media type (the AI SDK’s file part). The data is the bytes, or the same bytes as
base64 text in Base64; DataType names another kind (url, reference, or text) a provider may reject.
Inheritance: object → DecisionStatePart
Implements: IEquatable<DecisionStatePart>, IEquatable<DecisionFilePart>
Constructors
Section titled “Constructors”DecisionFilePart(string, byte[])
Section titled “DecisionFilePart(string, byte[])”public DecisionFilePart(string MediaType, byte[] Data)A file, such as a screenshot, as bytes with its media type (the AI SDK’s file part). The data is the bytes, or the same bytes as
base64 text in Base64; DataType names another kind (url, reference, or text) a provider may reject.
Parameters
| Name | Type | Description |
|---|---|---|
MediaType |
string | |
Data |
byte[] |
Properties
Section titled “Properties”Base64
Section titled “Base64”public string? Base64 { get; init; }The data as base64 text, when it came that way; Data is then ignored.
Value: string
public byte[] Data { get; init; }Value: byte[]
DataType
Section titled “DataType”public string DataType { get; init; }The kind of data the part carries: data, url, reference, or text.
Value: string
Filename
Section titled “Filename”public string? Filename { get; init; }The file’s name.
Value: string
MediaType
Section titled “MediaType”public string MediaType { get; init; }Value: string
ProviderOptions
Section titled “ProviderOptions”public IReadOnlyDictionary<string, JsonElement>? ProviderOptions { get; init; }The options for this part, keyed by provider name. Each value is a JSON value.
Value: IReadOnlyDictionary<string, JsonElement>
Reference
Section titled “Reference”public JsonElement? Reference { get; init; }The provider references of a reference part.
Value: JsonElement?
public string? Text { get; init; }The text of a text part.
Value: string
public Uri? Url { get; init; }The URL of a url part.
Value: Uri
Methods
Section titled “Methods”GetBase64()
Section titled “GetBase64()”public string GetBase64()The file’s bytes as base64 text.
Returns: string
GetBytes()
Section titled “GetBytes()”public byte[] GetBytes()The file’s bytes.
Returns: byte[]