Class Content
- Namespace
- OpenAI
- Assembly
- OpenAI-DotNet.dll
public sealed class Content
- Inheritance
-
Content
- Inherited Members
Constructors
Content()
public Content()
Content(ContentType, string)
public Content(ContentType type, string input)
Parameters
type
ContentTypeinput
string
Content(ImageFile)
public Content(ImageFile imageFile)
Parameters
imageFile
ImageFile
Content(ImageUrl)
public Content(ImageUrl imageUrl)
Parameters
imageUrl
ImageUrl
Content(InputAudio)
public Content(InputAudio inputAudio)
Parameters
inputAudio
InputAudio
Content(TextContent)
public Content(TextContent textContent)
Parameters
textContent
TextContent
Content(string)
public Content(string text)
Parameters
text
string
Properties
ImageFile
[JsonInclude]
[JsonPropertyName("image_file")]
[JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingDefault)]
public ImageFile ImageFile { get; }
Property Value
ImageUrl
[JsonInclude]
[JsonPropertyName("image_url")]
[JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingDefault)]
public ImageUrl ImageUrl { get; }
Property Value
Index
[JsonInclude]
[JsonPropertyName("index")]
[JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingDefault)]
public int? Index { get; }
Property Value
- int?
InputAudio
[JsonInclude]
[JsonPropertyName("input_audio")]
[JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingDefault)]
public InputAudio InputAudio { get; }
Property Value
Text
[JsonInclude]
[JsonPropertyName("text")]
[JsonConverter(typeof(StringOrObjectConverter<TextContent>))]
[JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingDefault)]
public object Text { get; }
Property Value
Type
[JsonInclude]
[JsonPropertyName("type")]
[JsonConverter(typeof(JsonStringEnumConverter<ContentType>))]
[JsonIgnore(Condition = JsonIgnoreCondition.Never)]
public ContentType Type { get; }
Property Value
Methods
AppendFrom(Content)
public void AppendFrom(Content other)
Parameters
other
Content
ToString()
Returns a string that represents the current object.
public override string ToString()
Returns
- string
A string that represents the current object.
Operators
implicit operator Content(ImageFile)
public static implicit operator Content(ImageFile imageFile)
Parameters
imageFile
ImageFile
Returns
implicit operator Content(ImageUrl)
public static implicit operator Content(ImageUrl imageUrl)
Parameters
imageUrl
ImageUrl
Returns
implicit operator Content(InputAudio)
public static implicit operator Content(InputAudio inputAudio)
Parameters
inputAudio
InputAudio
Returns
implicit operator Content(string)
public static implicit operator Content(string input)
Parameters
input
string