Table of Contents

Class ImageUrl

Namespace
OpenAI
Assembly
OpenAI-DotNet.dll

References an image URL in the content of a message.

public sealed class ImageUrl
Inheritance
ImageUrl
Inherited Members

Constructors

ImageUrl()

public ImageUrl()

ImageUrl(string, ImageDetail)

Constructor.

public ImageUrl(string url, ImageDetail detail = ImageDetail.Auto)

Parameters

url string

The external URL of the image, must be a supported image types: jpeg, jpg, png, gif, webp.

detail ImageDetail

Specifies the detail level of the image if specified by the user. 'low' uses fewer tokens, you can opt in to high resolution using 'high'.

Properties

Detail

Specifies the detail level of the image if specified by the user. 'low' uses fewer tokens, you can opt in to high resolution using 'high'.

[JsonInclude]
[JsonPropertyName("detail")]
[JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingDefault)]
public ImageDetail Detail { get; }

Property Value

ImageDetail

Index

[JsonInclude]
[JsonPropertyName("index")]
[JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingDefault)]
public int? Index { get; }

Property Value

int?

Url

The external URL of the image, must be a supported image types: jpeg, jpg, png, gif, webp.

[JsonInclude]
[JsonPropertyName("url")]
[JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingDefault)]
public string Url { get; }

Property Value

string

Methods

AppendFrom(ImageUrl)

public void AppendFrom(ImageUrl other)

Parameters

other ImageUrl

ToString()

Returns a string that represents the current object.

public override string ToString()

Returns

string

A string that represents the current object.