Skip to content

Commit

Permalink
feat: adds quality to ImagesQuery
Browse files Browse the repository at this point in the history
  • Loading branch information
kevinhermawan committed Nov 26, 2023
1 parent 0db1679 commit a10d2f9
Showing 1 changed file with 7 additions and 3 deletions.
10 changes: 7 additions & 3 deletions Sources/OpenAI/Public/Models/ImagesQuery.swift
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
//
// ImagesQuery.swift
//
//
//
// Created by Sergii Kryvoblotskyi on 02/04/2023.
//
Expand Down Expand Up @@ -31,15 +31,18 @@ public struct ImagesQuery: Codable {
public let user: String?
/// The style of the generated images. Must be one of vivid or natural. Vivid causes the model to lean towards generating hyper-real and dramatic images. Natural causes the model to produce more natural, less hyper-real looking images. This param is only supported for dall-e-3.
public let style: String?

public init(prompt: String, model: Model?=nil, responseFormat: Self.ResponseFormat?=nil, n: Int?, size: String?, style: String?=nil, user:String?=nil) {
/// The quality of the image that will be generated. hd creates images with finer details and greater consistency across the image. This param is only supported for dall-e-3.
public let quality: String?

public init(prompt: String, model: Model?=nil, responseFormat: Self.ResponseFormat?=nil, n: Int?, size: String?, style: String?=nil, user:String?=nil, quality:String?=nil) {
self.style = style
self.prompt = prompt
self.n = n
self.size = size
self.model = model
self.responseFormat = responseFormat
self.user = user
self.quality = quality
}

public enum CodingKeys: String, CodingKey {
Expand All @@ -50,5 +53,6 @@ public struct ImagesQuery: Codable {
case user
case style
case responseFormat = "response_format"
case quality
}
}

0 comments on commit a10d2f9

Please sign in to comment.