Class ImageFile
- Namespace
- OpenAI
- Assembly
- OpenAI-DotNet.dll
References an image file in the content of a message.
public sealed class ImageFile- Inheritance
- 
      
      ImageFile
- Inherited Members
Constructors
ImageFile()
public ImageFile()ImageFile(string, ImageDetail)
Constructor.
public ImageFile(string fileId, ImageDetail detail = ImageDetail.Auto)Parameters
- fileIdstring
- The file ID of the image in the message content. Set purpose='vision' when uploading the file if you need to later display the file content. 
- detailImageDetail
- 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
FileId
The file ID of the image in the message content. Set purpose='vision' when uploading the file if you need to later display the file content.
[JsonInclude]
[JsonPropertyName("file_id")]
[JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingDefault)]
public string FileId { get; }Property Value
Index
[JsonInclude]
[JsonPropertyName("index")]
[JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingDefault)]
public int? Index { get; }Property Value
- int?
Methods
AppendFrom(ImageFile)
public void AppendFrom(ImageFile other)Parameters
- otherImageFile
ToString()
Returns a string that represents the current object.
public override string ToString()Returns
- string
- A string that represents the current object.