Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: adds quality to ImagesQuery #132

Merged
merged 1 commit into from
Nov 27, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
}
}