-
-
Notifications
You must be signed in to change notification settings - Fork 46
ImageParameters
MarcoDotIO edited this page Dec 5, 2022
·
1 revision
Parameter used for generating images given a prompt.
public struct ImageParameters
public init(
prompt: String,
@Clamped(range: 1...10) numberofImages: Int = 1,
resolution: ImageResolutions = .large,
responseFormat: ResponseFormat = .url,
user: String? = nil
)
A text description of the desired image(s).
public var prompt: String
The maximum length is 1000 characters.
The number of images to generate.
public var numberOfImages: Int
Must be between 1 and 10.
The size of the generated images.
public var resolution: ImageResolutions
Must be one of .small
, .medium
, or .large
.
The format in which the generated images are returned.
public var responseFormat: ResponseFormat
Must be one of url
or b64_json
.
A unique identifier representing your end-user, which can help OpenAI to monitor and detect abuse. Learn more.
public var user: String?
The body of the URL used for OpenAI API requests.
public var body: [String: Any]
Generated at 2023-03-04T02:43:47+0000 using swift-doc 1.0.0-rc.1.
Types
- ChatChoice
- ChatMessage
- ChatParameters
- ChatResponse
- ChatRole
- Choice
- CompletionParameters
- CompletionResponse
- Configuration
- ContentPolicyCategories
- ContentPolicyCategoryScore
- ContentPolicyModels
- ContentPolicyParameters
- ContentPolicyResponse
- ContentPolicyResult
- CreateFineTuneParameters
- DeleteObject
- EditParameters
- EditResponse
- EmbeddingsData
- EmbeddingsParameters
- EmbeddingsResponse
- EmbeddingsUsage
- File
- FileStatus
- FineTune
- FineTuneEvent
- FineTuneEventInfo
- FineTuneEventsResponse
- FineTuneHyperparamters
- FineTuneStatus
- FineTuneTraining
- FormData
- HTTPMethod
- ImageData
- ImageEditParameters
- ImageParameters
- ImageResolutions
- ImageResponse
- ImageVariationParameters
- ListFilesResponse
- ListFineTuneResponse
- ListModelResponse
- Model
- ModelPermission
- OpenAIError
- OpenAIErrorMessage
- OpenAIErrorResponse
- OpenAIObject
- ResponseFormat
- UploadFileParameters
- Usage
Global Functions
- cancelFineTune(fineTune:)
- checkContentPolicy(parameters:)
- createEmbeddings(parameters:)
- createFineTune(parameters:)
- createImage(parameters:)
- decodeBase64Image(_:)
- decodeUrl(_:with:apiKey:body:method:bodyRequired:formSubmission:)
- deleteFile(fileId:)
- deleteFineTuneModel(model:)
- generateChatCompletion(parameters:)
- generateCompletion(parameters:)
- generateEdit(parameters:)
- generateImageEdits(parameters:)
- generateImageVariations(parameters:)
- listFiles()
- listFineTuneEvents(fineTune:)
- listFineTunes()
- listModels()
- retrieveFile(fileId:)
- retrieveFileContent(fileId:)
- retrieveFineTune(fineTune:)
- retrieveJsonLine(_:with:apiKey:)
- retrieveModel(modelId:)
- uploadFile(parameters:)