-
-
Notifications
You must be signed in to change notification settings - Fork 46
EmbeddingsParameters
Parameter used for the Embeddings endpoint.
public struct EmbeddingsParameters
public init(model: String, input: String, user: String? = nil)
ID of the model to use.
public var model: String
You can use the List models API to see all of your available models, or see our Model overview for descriptions of them.
Input text to get embeddings for, encoded as a string or array of tokens.
public var input: String
To get embeddings for multiple inputs in a single request, pass an array of strings or array of token arrays. Each input must not exceed 2048 tokens in length.
Unless you are embedding code, we suggest replacing newlines (\n
) in your input with a single space,
as we have observed inferior results when newlines are present.
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:)