Detail
ChatQuery.swift:517enum Detail
enum Detail
s6OpenAI9ChatQueryV0C22CompletionMessageParamO04UserfG0V7ContentO06VisionI0O0cei9PartImageG0V0L3URLV6DetailO
What are these?7HKTL
import OpenAI
struct ImageURL
struct ChatQuery
Creates a model response for the given chat conversation https://platform.openai.com/docs/guides/text-generation
enum ChatCompletionMessageParam
struct UserMessageParam
enum Content
enum VisionContent
struct ChatCompletionContentPartImageParam
case auto
case low
case high
init(from decoder: any Decoder) throws
init(url: Data, detail: Detail)
init(url: String, detail: Detail)
let detail: Detail
Specifies the detail level of the image. Learn more in the Vision guide https://platform.openai.com/docs/guides/vision/low-or-high-fidelity-image-understanding
let url: String
Either a URL of the image or the base64 encoded image data.
protocol CaseIterable
A type that provides a collection of all of its values.
protocol Decodable
A type that can decode itself from an external representation.
protocol Encodable
A type that can encode itself to an external representation.
protocol Equatable
A type that can be compared for value equality.
protocol Hashable : Equatable
A type that can be hashed into a Hasher
to produce an integer hash value.
protocol RawRepresentable<RawValue>
A type that can be converted to and from an associated raw value.
init?(rawValue: String)
init(from decoder: any Decoder) throws
Creates a new instance by decoding from the given decoder, when the type’s RawValue
is String
.
var hashValue: Int { get }
static func != (lhs: Self, rhs: Self) -> Bool
Returns a Boolean value indicating whether two values are not equal.
func encode(to encoder: any Encoder) throws
Encodes this value into the given encoder, when the type’s RawValue
is String
.
func hash(into hasher: inout Hasher)