package model
- Alphabetic
- By Inheritance
- model
- AnyRef
- Any
- Hide All
- Show All
- Public
- Protected
Type Members
- final case class CreateAnswerRequest(model: String, question: Question, examples: NonEmptyChunk[Chunk[ExamplesItemItem]], examplesContext: String, documents: Optional[Chunk[String]] = Optional.Absent, file: Optional[String] = Optional.Absent, searchModel: Optional[String] = Optional.Absent, maxRerank: Optional[Int] = Optional.Absent, temperature: Optional[Double] = Optional.Absent, logprobs: Optional[Logprobs] = Optional.Absent, maxTokens: Optional[Int] = Optional.Absent, stop: Optional[Stop] = Optional.Absent, n: Optional[CreateAnswerRequest.N] = Optional.Absent, logitBias: Optional[LogitBias] = Optional.Absent, returnMetadata: Optional[Boolean] = Optional.Absent, returnPrompt: Optional[Boolean] = Optional.Absent, expand: Optional[Chunk[ExpandItem]] = Optional.Absent, user: Optional[String] = Optional.Absent) extends Product with Serializable
CreateAnswerRequest model
CreateAnswerRequest model
- model
ID of the model to use for completion. You can select one of
ada,babbage,curie, ordavinci.- question
Question to get answered.
- examples
List of (question, answer) pairs that will help steer the model towards the tone and answer format you'd like. We recommend adding 2 to 3 examples.
- examplesContext
A text snippet containing the contextual information used to generate the answers for the
examplesyou provide.- documents
List of documents from which the answer for the input
questionshould be derived. If this is an empty list, the question will be answered based on the question-answer examples. You should specify eitherdocumentsor afile, but not both.- file
The ID of an uploaded file that contains documents to search over. See [upload file](/docs/api-reference/files/upload) for how to upload a file of the desired format and purpose. You should specify either
documentsor afile, but not both.- searchModel
ID of the model to use for [Search](/docs/api-reference/searches/create). You can select one of
ada,babbage,curie, ordavinci.- maxRerank
The maximum number of documents to be ranked by [Search](/docs/api-reference/searches/create) when using
file. Setting it to a higher value leads to improved accuracy but with increased latency and cost.- temperature
What [sampling temperature](https://towardsdatascience.com/how-to-sample-from-language-models-682bceb97277) to use. Higher values mean the model will take more risks and value 0 (argmax sampling) works better for scenarios with a well-defined answer.
- logprobs
Include the log probabilities on the
logprobsmost likely tokens, as well the chosen tokens. For example, iflogprobsis 5, the API will return a list of the 5 most likely tokens. The API will always return thelogprobof the sampled token, so there may be up tologprobs+1elements in the response. The maximum value forlogprobsis 5. If you need more than this, please contact us through our [Help center](https://help.openai.com) and describe your use case. Whenlogprobsis set,completionwill be automatically added intoexpandto get the logprobs.- maxTokens
The maximum number of tokens allowed for the generated answer
- stop
Up to 4 sequences where the API will stop generating further tokens. The returned text will not contain the stop sequence.
- n
How many answers to generate for each question.
- logitBias
Modify the likelihood of specified tokens appearing in the completion. Accepts a json object that maps tokens (specified by their token ID in the GPT tokenizer) to an associated bias value from -100 to 100. You can use this [tokenizer tool](/tokenizer?view=bpe) (which works for both GPT-2 and GPT-3) to convert text to token IDs. Mathematically, the bias is added to the logits generated by the model prior to sampling. The exact effect will vary per model, but values between -1 and 1 should decrease or increase likelihood of selection; values like -100 or 100 should result in a ban or exclusive selection of the relevant token. As an example, you can pass
{"50256": -100}to prevent the <|endoftext|> token from being generated.- returnMetadata
A special boolean flag for showing metadata. If set to
true, each document entry in the returned JSON will contain a "metadata" field. This flag only takes effect whenfileis set.- returnPrompt
If set to
true, the returned JSON will include a "prompt" field containing the final prompt that was used to request a completion. This is mainly useful for debugging purposes.- expand
If an object name is in the list, we provide the full information of the object; otherwise, we only provide the object ID. Currently we support
completionandfileobjects for expansion.- user
A unique identifier representing your end-user, which can help OpenAI to monitor and detect abuse. [Learn more](/docs/guides/safety-best-practices/end-user-ids).
- final case class CreateAnswerResponse(object: Optional[String] = Optional.Absent, model: Optional[String] = Optional.Absent, searchModel: Optional[String] = Optional.Absent, completion: Optional[String] = Optional.Absent, answers: Optional[Chunk[String]] = Optional.Absent, selectedDocuments: Optional[Chunk[SelectedDocumentsItem]] = Optional.Absent) extends Product with Serializable
CreateAnswerResponse model
- final case class CreateClassificationRequest(model: String, query: Query, examples: Optional[Chunk[Chunk[ExamplesItemItem]]] = Optional.Absent, file: Optional[String] = Optional.Absent, labels: Optional[Chunk[String]] = Optional.Absent, searchModel: Optional[String] = Optional.Absent, temperature: Optional[CreateClassificationRequest.Temperature] = Optional.Absent, logprobs: Optional[Logprobs] = Optional.Absent, maxExamples: Optional[Int] = Optional.Absent, logitBias: Optional[LogitBias] = Optional.Absent, returnPrompt: Optional[Boolean] = Optional.Absent, returnMetadata: Optional[Boolean] = Optional.Absent, expand: Optional[Chunk[ExpandItem]] = Optional.Absent, user: Optional[String] = Optional.Absent) extends Product with Serializable
CreateClassificationRequest model
CreateClassificationRequest model
- model
ID of the model to use. You can use the [List models](/docs/api-reference/models/list) API to see all of your available models, or see our [Model overview](/docs/models/overview) for descriptions of them.
- query
Query to be classified.
- examples
A list of examples with labels, in the following format:
[ ["The movie is so interesting.", "Positive"], ["It is quite boring.", "Negative"], ...]All the label strings will be normalized to be capitalized. You should specify eitherexamplesorfile, but not both.- file
The ID of the uploaded file that contains training examples. See [upload file](/docs/api-reference/files/upload) for how to upload a file of the desired format and purpose. You should specify either
examplesorfile, but not both.- labels
The set of categories being classified. If not specified, candidate labels will be automatically collected from the examples you provide. All the label strings will be normalized to be capitalized.
- searchModel
ID of the model to use for [Search](/docs/api-reference/searches/create). You can select one of
ada,babbage,curie, ordavinci.- temperature
What sampling
temperatureto use. Higher values mean the model will take more risks. Try 0.9 for more creative applications, and 0 (argmax sampling) for ones with a well-defined answer.- logprobs
Include the log probabilities on the
logprobsmost likely tokens, as well the chosen tokens. For example, iflogprobsis 5, the API will return a list of the 5 most likely tokens. The API will always return thelogprobof the sampled token, so there may be up tologprobs+1elements in the response. The maximum value forlogprobsis 5. If you need more than this, please contact us through our [Help center](https://help.openai.com) and describe your use case. Whenlogprobsis set,completionwill be automatically added intoexpandto get the logprobs.- maxExamples
The maximum number of examples to be ranked by [Search](/docs/api-reference/searches/create) when using
file. Setting it to a higher value leads to improved accuracy but with increased latency and cost.- logitBias
Modify the likelihood of specified tokens appearing in the completion. Accepts a json object that maps tokens (specified by their token ID in the GPT tokenizer) to an associated bias value from -100 to 100. You can use this [tokenizer tool](/tokenizer?view=bpe) (which works for both GPT-2 and GPT-3) to convert text to token IDs. Mathematically, the bias is added to the logits generated by the model prior to sampling. The exact effect will vary per model, but values between -1 and 1 should decrease or increase likelihood of selection; values like -100 or 100 should result in a ban or exclusive selection of the relevant token. As an example, you can pass
{"50256": -100}to prevent the <|endoftext|> token from being generated.- returnPrompt
If set to
true, the returned JSON will include a "prompt" field containing the final prompt that was used to request a completion. This is mainly useful for debugging purposes.- returnMetadata
A special boolean flag for showing metadata. If set to
true, each document entry in the returned JSON will contain a "metadata" field. This flag only takes effect whenfileis set.- expand
If an object name is in the list, we provide the full information of the object; otherwise, we only provide the object ID. Currently we support
completionandfileobjects for expansion.- user
A unique identifier representing your end-user, which can help OpenAI to monitor and detect abuse. [Learn more](/docs/guides/safety-best-practices/end-user-ids).
- final case class CreateClassificationResponse(object: Optional[String] = Optional.Absent, model: Optional[String] = Optional.Absent, searchModel: Optional[String] = Optional.Absent, completion: Optional[String] = Optional.Absent, label: Optional[String] = Optional.Absent, selectedExamples: Optional[Chunk[SelectedExamplesItem]] = Optional.Absent) extends Product with Serializable
CreateClassificationResponse model
- final case class CreateCompletionRequest(model: String, prompt: Optional[Prompt] = Optional.Absent, suffix: Optional[String] = Optional.Absent, maxTokens: Optional[MaxTokens] = Optional.Absent, temperature: Optional[Temperature] = Optional.Absent, topP: Optional[TopP] = Optional.Absent, n: Optional[CreateCompletionRequest.N] = Optional.Absent, stream: Optional[Boolean] = Optional.Absent, logprobs: Optional[CreateCompletionRequest.Logprobs] = Optional.Absent, echo: Optional[Boolean] = Optional.Absent, stop: Optional[Stop] = Optional.Absent, presencePenalty: Optional[PresencePenalty] = Optional.Absent, frequencyPenalty: Optional[FrequencyPenalty] = Optional.Absent, bestOf: Optional[BestOf] = Optional.Absent, logitBias: Optional[LogitBias] = Optional.Absent, user: Optional[String] = Optional.Absent) extends Product with Serializable
CreateCompletionRequest model
CreateCompletionRequest model
- model
ID of the model to use. You can use the [List models](/docs/api-reference/models/list) API to see all of your available models, or see our [Model overview](/docs/models/overview) for descriptions of them.
- prompt
The prompt(s) to generate completions for, encoded as a string, array of strings, array of tokens, or array of token arrays. Note that <|endoftext|> is the document separator that the model sees during training, so if a prompt is not specified the model will generate as if from the beginning of a new document.
- suffix
The suffix that comes after a completion of inserted text.
- maxTokens
The maximum number of [tokens](/tokenizer) to generate in the completion. The token count of your prompt plus
max_tokenscannot exceed the model's context length. Most models have a context length of 2048 tokens (except for the newest models, which support 4096).- temperature
What [sampling temperature](https://towardsdatascience.com/how-to-sample-from-language-models-682bceb97277) to use. Higher values means the model will take more risks. Try 0.9 for more creative applications, and 0 (argmax sampling) for ones with a well-defined answer. We generally recommend altering this or
top_pbut not both.- topP
An alternative to sampling with temperature, called nucleus sampling, where the model considers the results of the tokens with top_p probability mass. So 0.1 means only the tokens comprising the top 10% probability mass are considered. We generally recommend altering this or
temperaturebut not both.- n
How many completions to generate for each prompt. **Note:** Because this parameter generates many completions, it can quickly consume your token quota. Use carefully and ensure that you have reasonable settings for
max_tokensandstop.- stream
Whether to stream back partial progress. If set, tokens will be sent as data-only [server-sent events](https://developer.mozilla.org/en-US/docs/Web/API/Server-sent_events/Using_server-sent_events#Event_stream_format) as they become available, with the stream terminated by a
data: [DONE]message.- logprobs
Include the log probabilities on the
logprobsmost likely tokens, as well the chosen tokens. For example, iflogprobsis 5, the API will return a list of the 5 most likely tokens. The API will always return thelogprobof the sampled token, so there may be up tologprobs+1elements in the response. The maximum value forlogprobsis 5. If you need more than this, please contact us through our [Help center](https://help.openai.com) and describe your use case.- echo
Echo back the prompt in addition to the completion
- stop
Up to 4 sequences where the API will stop generating further tokens. The returned text will not contain the stop sequence.
- presencePenalty
Number between -2.0 and 2.0. Positive values penalize new tokens based on whether they appear in the text so far, increasing the model's likelihood to talk about new topics. [See more information about frequency and presence penalties.](/docs/api-reference/parameter-details)
- frequencyPenalty
Number between -2.0 and 2.0. Positive values penalize new tokens based on their existing frequency in the text so far, decreasing the model's likelihood to repeat the same line verbatim. [See more information about frequency and presence penalties.](/docs/api-reference/parameter-details)
- bestOf
Generates
best_ofcompletions server-side and returns the "best" (the one with the highest log probability per token). Results cannot be streamed. When used withn,best_ofcontrols the number of candidate completions andnspecifies how many to return –best_ofmust be greater thann. **Note:** Because this parameter generates many completions, it can quickly consume your token quota. Use carefully and ensure that you have reasonable settings formax_tokensandstop.- logitBias
Modify the likelihood of specified tokens appearing in the completion. Accepts a json object that maps tokens (specified by their token ID in the GPT tokenizer) to an associated bias value from -100 to 100. You can use this [tokenizer tool](/tokenizer?view=bpe) (which works for both GPT-2 and GPT-3) to convert text to token IDs. Mathematically, the bias is added to the logits generated by the model prior to sampling. The exact effect will vary per model, but values between -1 and 1 should decrease or increase likelihood of selection; values like -100 or 100 should result in a ban or exclusive selection of the relevant token. As an example, you can pass
{"50256": -100}to prevent the <|endoftext|> token from being generated.- user
A unique identifier representing your end-user, which can help OpenAI to monitor and detect abuse. [Learn more](/docs/guides/safety-best-practices/end-user-ids).
- final case class CreateCompletionResponse(id: String, object: String, created: Int, model: String, choices: Chunk[ChoicesItem], usage: Optional[Usage] = Optional.Absent) extends Product with Serializable
CreateCompletionResponse model
- final case class CreateEditRequest(model: String, input: Optional[String] = Optional.Absent, instruction: String, n: Optional[CreateEditRequest.N] = Optional.Absent, temperature: Optional[Temperature] = Optional.Absent, topP: Optional[TopP] = Optional.Absent) extends Product with Serializable
CreateEditRequest model
CreateEditRequest model
- model
ID of the model to use. You can use the [List models](/docs/api-reference/models/list) API to see all of your available models, or see our [Model overview](/docs/models/overview) for descriptions of them.
- input
The input text to use as a starting point for the edit.
- instruction
The instruction that tells the model how to edit the prompt.
- n
How many edits to generate for the input and instruction.
- temperature
What [sampling temperature](https://towardsdatascience.com/how-to-sample-from-language-models-682bceb97277) to use. Higher values means the model will take more risks. Try 0.9 for more creative applications, and 0 (argmax sampling) for ones with a well-defined answer. We generally recommend altering this or
top_pbut not both.- topP
An alternative to sampling with temperature, called nucleus sampling, where the model considers the results of the tokens with top_p probability mass. So 0.1 means only the tokens comprising the top 10% probability mass are considered. We generally recommend altering this or
temperaturebut not both.
- final case class CreateEditResponse(id: Optional[String] = Optional.Absent, object: String, created: Int, model: Optional[String] = Optional.Absent, choices: Chunk[ChoicesItem], usage: Usage) extends Product with Serializable
CreateEditResponse model
- final case class CreateEmbeddingRequest(model: String, input: Input, user: Optional[String] = Optional.Absent) extends Product with Serializable
CreateEmbeddingRequest model
CreateEmbeddingRequest model
- model
ID of the model to use. You can use the [List models](/docs/api-reference/models/list) API to see all of your available models, or see our [Model overview](/docs/models/overview) for descriptions of them.
- input
Input text to get embeddings for, encoded as a string or array of tokens. 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 8192 tokens in length.
- user
A unique identifier representing your end-user, which can help OpenAI to monitor and detect abuse. [Learn more](/docs/guides/safety-best-practices/end-user-ids).
- final case class CreateEmbeddingResponse(object: String, model: String, data: Chunk[DataItem], usage: Usage) extends Product with Serializable
CreateEmbeddingResponse model
- final case class CreateFileRequest(file: File, purpose: String) extends Product with Serializable
CreateFileRequest model
CreateFileRequest model
- file
Name of the [JSON Lines](https://jsonlines.readthedocs.io/en/latest/) file to be uploaded. If the
purposeis set to "fine-tune", each line is a JSON record with "prompt" and "completion" fields representing your [training examples](/docs/guides/fine-tuning/prepare-training-data).- purpose
The intended purpose of the uploaded documents. Use "fine-tune" for [Fine-tuning](/docs/api-reference/fine-tunes). This allows us to validate the format of the uploaded file.
- final case class CreateFineTuneRequest(trainingFile: String, validationFile: Optional[String] = Optional.Absent, model: Optional[String] = Optional.Absent, nEpochs: Optional[Int] = Optional.Absent, batchSize: Optional[Int] = Optional.Absent, learningRateMultiplier: Optional[Double] = Optional.Absent, promptLossWeight: Optional[Double] = Optional.Absent, computeClassificationMetrics: Optional[Boolean] = Optional.Absent, classificationNClasses: Optional[Int] = Optional.Absent, classificationPositiveClass: Optional[String] = Optional.Absent, classificationBetas: Optional[Chunk[Double]] = Optional.Absent, suffix: Optional[Suffix] = Optional.Absent) extends Product with Serializable
CreateFineTuneRequest model
CreateFineTuneRequest model
- trainingFile
The ID of an uploaded file that contains training data. See [upload file](/docs/api-reference/files/upload) for how to upload a file. Your dataset must be formatted as a JSONL file, where each training example is a JSON object with the keys "prompt" and "completion". Additionally, you must upload your file with the purpose
fine-tune. See the [fine-tuning guide](/docs/guides/fine-tuning/creating-training-data) for more details.- validationFile
The ID of an uploaded file that contains validation data. If you provide this file, the data is used to generate validation metrics periodically during fine-tuning. These metrics can be viewed in the [fine-tuning results file](/docs/guides/fine-tuning/analyzing-your-fine-tuned-model). Your train and validation data should be mutually exclusive. Your dataset must be formatted as a JSONL file, where each validation example is a JSON object with the keys "prompt" and "completion". Additionally, you must upload your file with the purpose
fine-tune. See the [fine-tuning guide](/docs/guides/fine-tuning/creating-training-data) for more details.- model
The name of the base model to fine-tune. You can select one of "ada", "babbage", "curie", "davinci", or a fine-tuned model created after 2022-04-21. To learn more about these models, see the [Models](https://beta.openai.com/docs/models) documentation.
- nEpochs
The number of epochs to train the model for. An epoch refers to one full cycle through the training dataset.
- batchSize
The batch size to use for training. The batch size is the number of training examples used to train a single forward and backward pass. By default, the batch size will be dynamically configured to be ~0.2% of the number of examples in the training set, capped at 256 - in general, we've found that larger batch sizes tend to work better for larger datasets.
- learningRateMultiplier
The learning rate multiplier to use for training. The fine-tuning learning rate is the original learning rate used for pretraining multiplied by this value. By default, the learning rate multiplier is the 0.05, 0.1, or 0.2 depending on final
batch_size(larger learning rates tend to perform better with larger batch sizes). We recommend experimenting with values in the range 0.02 to 0.2 to see what produces the best results.- promptLossWeight
The weight to use for loss on the prompt tokens. This controls how much the model tries to learn to generate the prompt (as compared to the completion which always has a weight of 1.0), and can add a stabilizing effect to training when completions are short. If prompts are extremely long (relative to completions), it may make sense to reduce this weight so as to avoid over-prioritizing learning the prompt.
- computeClassificationMetrics
If set, we calculate classification-specific metrics such as accuracy and F-1 score using the validation set at the end of every epoch. These metrics can be viewed in the [results file](/docs/guides/fine-tuning/analyzing-your-fine-tuned-model). In order to compute classification metrics, you must provide a
validation_file. Additionally, you must specifyclassification_n_classesfor multiclass classification orclassification_positive_classfor binary classification.- classificationNClasses
The number of classes in a classification task. This parameter is required for multiclass classification.
- classificationPositiveClass
The positive class in binary classification. This parameter is needed to generate precision, recall, and F1 metrics when doing binary classification.
- classificationBetas
If this is provided, we calculate F-beta scores at the specified beta values. The F-beta score is a generalization of F-1 score. This is only used for binary classification. With a beta of 1 (i.e. the F-1 score), precision and recall are given the same weight. A larger beta score puts more weight on recall and less on precision. A smaller beta score puts more weight on precision and less on recall.
- suffix
A string of up to 40 characters that will be added to your fine-tuned model name. For example, a
suffixof "custom-model-name" would produce a model name likeada:ft-your-org:custom-model-name-2022-02-15-04-21-04.
- final case class CreateImageEditRequest(image: File, mask: Optional[File] = Optional.Absent, prompt: String, n: Optional[N] = Optional.Absent, size: Optional[Size] = Optional.Absent, responseFormat: Optional[ResponseFormat] = Optional.Absent, user: Optional[String] = Optional.Absent) extends Product with Serializable
CreateImageEditRequest model
CreateImageEditRequest model
- image
The image to edit. Must be a valid PNG file, less than 4MB, and square. If mask is not provided, image must have transparency, which will be used as the mask.
- mask
An additional image whose fully transparent areas (e.g. where alpha is zero) indicate where
imageshould be edited. Must be a valid PNG file, less than 4MB, and have the same dimensions asimage.- prompt
A text description of the desired image(s). The maximum length is 1000 characters.
- n
The number of images to generate. Must be between 1 and 10.
- size
The size of the generated images. Must be one of
256x256,512x512, or1024x1024.- responseFormat
The format in which the generated images are returned. Must be one of
urlorb64_json.- user
A unique identifier representing your end-user, which can help OpenAI to monitor and detect abuse. [Learn more](/docs/guides/safety-best-practices/end-user-ids).
- final case class CreateImageRequest(prompt: String, n: Optional[N] = Optional.Absent, size: Optional[Size] = Optional.Absent, responseFormat: Optional[ResponseFormat] = Optional.Absent, user: Optional[String] = Optional.Absent) extends Product with Serializable
CreateImageRequest model
CreateImageRequest model
- prompt
A text description of the desired image(s). The maximum length is 1000 characters.
- n
The number of images to generate. Must be between 1 and 10.
- size
The size of the generated images. Must be one of
256x256,512x512, or1024x1024.- responseFormat
The format in which the generated images are returned. Must be one of
urlorb64_json.- user
A unique identifier representing your end-user, which can help OpenAI to monitor and detect abuse. [Learn more](/docs/guides/safety-best-practices/end-user-ids).
- final case class CreateImageVariationRequest(image: File, n: Optional[N] = Optional.Absent, size: Optional[Size] = Optional.Absent, responseFormat: Optional[ResponseFormat] = Optional.Absent, user: Optional[String] = Optional.Absent) extends Product with Serializable
CreateImageVariationRequest model
CreateImageVariationRequest model
- image
The image to use as the basis for the variation(s). Must be a valid PNG file, less than 4MB, and square.
- n
The number of images to generate. Must be between 1 and 10.
- size
The size of the generated images. Must be one of
256x256,512x512, or1024x1024.- responseFormat
The format in which the generated images are returned. Must be one of
urlorb64_json.- user
A unique identifier representing your end-user, which can help OpenAI to monitor and detect abuse. [Learn more](/docs/guides/safety-best-practices/end-user-ids).
- final case class CreateModerationRequest(input: Input, model: Optional[String] = Optional.Absent) extends Product with Serializable
CreateModerationRequest model
CreateModerationRequest model
- input
The input text to classify
- model
Two content moderations models are available:
text-moderation-stableandtext-moderation-latest. The default istext-moderation-latestwhich will be automatically upgraded over time. This ensures you are always using our most accurate model. If you usetext-moderation-stable, we will provide advanced notice before updating the model. Accuracy oftext-moderation-stablemay be slightly lower than fortext-moderation-latest.
- final case class CreateModerationResponse(id: String, model: String, results: Chunk[ResultsItem]) extends Product with Serializable
CreateModerationResponse model
- final case class CreateSearchRequest(query: Query, documents: Optional[NonEmptyChunk[String]] = Optional.Absent, file: Optional[String] = Optional.Absent, maxRerank: Optional[MaxRerank] = Optional.Absent, returnMetadata: Optional[Boolean] = Optional.Absent, user: Optional[String] = Optional.Absent) extends Product with Serializable
CreateSearchRequest model
CreateSearchRequest model
- query
Query to search against the documents.
- documents
Up to 200 documents to search over, provided as a list of strings. The maximum document length (in tokens) is 2034 minus the number of tokens in the query. You should specify either
documentsor afile, but not both.- file
The ID of an uploaded file that contains documents to search over. You should specify either
documentsor afile, but not both.- maxRerank
The maximum number of documents to be re-ranked and returned by search. This flag only takes effect when
fileis set.- returnMetadata
A special boolean flag for showing metadata. If set to
true, each document entry in the returned JSON will contain a "metadata" field. This flag only takes effect whenfileis set.- user
A unique identifier representing your end-user, which can help OpenAI to monitor and detect abuse. [Learn more](/docs/guides/safety-best-practices/end-user-ids).
- final case class CreateSearchResponse(object: Optional[String] = Optional.Absent, model: Optional[String] = Optional.Absent, data: Optional[Chunk[DataItem]] = Optional.Absent) extends Product with Serializable
CreateSearchResponse model
- final case class DeleteFileResponse(id: String, object: String, deleted: Boolean) extends Product with Serializable
DeleteFileResponse model
- final case class DeleteModelResponse(id: String, object: String, deleted: Boolean) extends Product with Serializable
DeleteModelResponse model
- final case class Engine(id: String, object: String, created: Optional[Int], ready: Boolean) extends Product with Serializable
Engine model
- final case class Error(message: String, type: String, param: Option[String], code: Option[String]) extends Product with Serializable
- final case class ErrorResponse(error: Error) extends Product with Serializable
- type ExamplesItemItem = model.ExamplesItemItem.Type
examples_item_item model
- final case class File(data: Chunk[Byte], fileName: String) extends Product with Serializable
- final case class FineTune(id: String, object: String, createdAt: Int, updatedAt: Int, model: String, fineTunedModel: Optional[String], organizationId: String, status: String, hyperparams: Hyperparams, trainingFiles: Chunk[OpenAIFile], validationFiles: Chunk[OpenAIFile], resultFiles: Chunk[OpenAIFile], events: Optional[Chunk[FineTuneEvent]] = Optional.Absent) extends Product with Serializable
FineTune model
- final case class FineTuneEvent(object: String, createdAt: Int, level: String, message: String) extends Product with Serializable
FineTuneEvent model
- final case class ImagesResponse(created: Int, data: Chunk[DataItem]) extends Product with Serializable
ImagesResponse model
- final case class ListEnginesResponse(object: String, data: Chunk[Engine]) extends Product with Serializable
ListEnginesResponse model
- final case class ListFilesResponse(object: String, data: Chunk[OpenAIFile]) extends Product with Serializable
ListFilesResponse model
- final case class ListFineTuneEventsResponse(object: String, data: Chunk[FineTuneEvent]) extends Product with Serializable
ListFineTuneEventsResponse model
- final case class ListFineTunesResponse(object: String, data: Chunk[FineTune]) extends Product with Serializable
ListFineTunesResponse model
- final case class ListModelsResponse(object: String, data: Chunk[Model]) extends Product with Serializable
ListModelsResponse model
- type Logprobs = model.Logprobs.Type
logprobs model
logprobs model
Include the log probabilities on the
logprobsmost likely tokens, as well the chosen tokens. For example, iflogprobsis 5, the API will return a list of the 5 most likely tokens. The API will always return thelogprobof the sampled token, so there may be up tologprobs+1elements in the response.The maximum value for
logprobsis 5. If you need more than this, please contact us through our [Help center](https://help.openai.com) and describe your use case.When
logprobsis set,completionwill be automatically added intoexpandto get the logprobs. - final case class Model(id: String, object: String, created: Int, ownedBy: String) extends Product with Serializable
Model model
- type N = model.N.Type
n model
n model
The number of images to generate. Must be between 1 and 10.
- sealed trait OpenAIFailure extends AnyRef
- final case class OpenAIFile(id: String, object: String, bytes: Int, createdAt: Int, filename: String, purpose: String, status: Optional[String] = Optional.Absent, statusDetails: Optional[StatusDetails] = Optional.Absent) extends Product with Serializable
OpenAIFile model
- sealed trait ResponseFormat extends AnyRef
response_format model
response_format model
The format in which the generated images are returned. Must be one of
urlorb64_json. - sealed trait Size extends AnyRef
size model
size model
The size of the generated images. Must be one of
256x256,512x512, or1024x1024. - type Temperature = model.Temperature.Type
temperature model
temperature model
What [sampling temperature](https://towardsdatascience.com/how-to-sample-from-language-models-682bceb97277) to use. Higher values means the model will take more risks. Try 0.9 for more creative applications, and 0 (argmax sampling) for ones with a well-defined answer.
We generally recommend altering this or
top_pbut not both. - type TopP = model.TopP.Type
top_p model
top_p model
An alternative to sampling with temperature, called nucleus sampling, where the model considers the results of the tokens with top_p probability mass. So 0.1 means only the tokens comprising the top 10% probability mass are considered.
We generally recommend altering this or
temperaturebut not both.
Value Members
- object CreateAnswerRequest extends Serializable
- object CreateAnswerResponse extends Serializable
- object CreateClassificationRequest extends Serializable
- object CreateClassificationResponse extends Serializable
- object CreateCompletionRequest extends Serializable
- object CreateCompletionResponse extends Serializable
- object CreateEditRequest extends Serializable
- object CreateEditResponse extends Serializable
- object CreateEmbeddingRequest extends Serializable
- object CreateEmbeddingResponse extends Serializable
- object CreateFileRequest extends Serializable
- object CreateFineTuneRequest extends Serializable
- object CreateImageEditRequest extends Serializable
- object CreateImageRequest extends Serializable
- object CreateImageVariationRequest extends Serializable
- object CreateModerationRequest extends Serializable
- object CreateModerationResponse extends Serializable
- object CreateSearchRequest extends Serializable
- object CreateSearchResponse extends Serializable
- object DeleteFileResponse extends Serializable
- object DeleteModelResponse extends Serializable
- object Engine extends Serializable
- object Error extends Serializable
- object ErrorResponse extends Serializable
- object ExamplesItemItem extends Subtype[String]
- object File extends Serializable
- object FineTune extends Serializable
- object FineTuneEvent extends Serializable
- object ImagesResponse extends Serializable
- object ListEnginesResponse extends Serializable
- object ListFilesResponse extends Serializable
- object ListFineTuneEventsResponse extends Serializable
- object ListFineTunesResponse extends Serializable
- object ListModelsResponse extends Serializable
- object Logprobs extends Subtype[Int]
- object Model extends Serializable
- object N extends Subtype[Int]
- object OpenAIFailure
- object OpenAIFile extends Serializable
- object ResponseFormat
- object Size
- object Temperature extends Subtype[Double]
- object TopP extends Subtype[Double]