Structuremacpaw.openai 0.3.2OpenAI
ImageURL
ChatQuery.swift:488struct ImageURL
struct ImageURL
s6OpenAI9ChatQueryV0C22CompletionMessageParamO04UserfG0V7ContentO06VisionI0O0cei9PartImageG0V0L3URLV
What are these?7WNTX
import OpenAI
struct ChatCompletionContentPartImageParam
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
init(from decoder: any Decoder) throws
init(imageUrl: ImageURL)
let imageUrl: ImageURL
let type: String
The type of the content part.
enum CodingKeys
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.
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.
enum Detail
static func != (lhs: Self, rhs: Self) -> Bool
Returns a Boolean value indicating whether two values are not equal.