Table of Contents

Class ImageContent

Namespace
Mythosia.AI.Models.Messages
Assembly
Mythosia.AI.Abstractions.dll

Image content in a message

public class ImageContent : MessageContent
Inheritance
ImageContent
Inherited Members

Constructors

ImageContent(byte[], string)

public ImageContent(byte[] data, string mimeType)

Parameters

data byte[]
mimeType string

ImageContent(string)

public ImageContent(string url)

Parameters

url string

Properties

Data

public byte[]? Data { get; set; }

Property Value

byte[]

IsHighDetail

public bool IsHighDetail { get; set; }

Property Value

bool

MimeType

public string? MimeType { get; set; }

Property Value

string

Type

public override string Type { get; }

Property Value

string

Url

public string? Url { get; set; }

Property Value

string

Methods

EstimateTokens()

Estimates the token count for this content

public override uint EstimateTokens()

Returns

uint

GetBase64Url()

public string GetBase64Url()

Returns

string

GetDescription()

Gets a display-friendly description of the content

public override string GetDescription()

Returns

string

ToRequestFormat(string)

Converts the content to the appropriate format for the specified AI provider

public override object ToRequestFormat(string provider)

Parameters

provider string

Returns

object