package model

Linear Supertypes
Ordering
  1. Alphabetic
  2. By Inheritance
Inherited
  1. model
  2. AnyRef
  3. Any
  1. Hide All
  2. Show All
Visibility
  1. Public
  2. Protected

Type Members

  1. 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, or davinci.

    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 examples you provide.

    documents

    List of documents from which the answer for the input question should be derived. If this is an empty list, the question will be answered based on the question-answer examples. You should specify either documents or a file, 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 documents or a file, 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, or davinci.

    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 logprobs most likely tokens, as well the chosen tokens. For example, if logprobs is 5, the API will return a list of the 5 most likely tokens. The API will always return the logprob of the sampled token, so there may be up to logprobs+1 elements in the response. The maximum value for logprobs is 5. If you need more than this, please contact us through our [Help center](https://help.openai.com) and describe your use case. When logprobs is set, completion will be automatically added into expand to 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 when file is 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 completion and file objects 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).

  2. 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

  3. 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 either examples or file, 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 examples or file, 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, or davinci.

    temperature

    What sampling temperature to 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 logprobs most likely tokens, as well the chosen tokens. For example, if logprobs is 5, the API will return a list of the 5 most likely tokens. The API will always return the logprob of the sampled token, so there may be up to logprobs+1 elements in the response. The maximum value for logprobs is 5. If you need more than this, please contact us through our [Help center](https://help.openai.com) and describe your use case. When logprobs is set, completion will be automatically added into expand to 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 when file is 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 completion and file objects 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).

  4. 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

  5. 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_tokens cannot 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_p but 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 temperature but 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_tokens and stop.

    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 logprobs most likely tokens, as well the chosen tokens. For example, if logprobs is 5, the API will return a list of the 5 most likely tokens. The API will always return the logprob of the sampled token, so there may be up to logprobs+1 elements in the response. The maximum value for logprobs is 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_of completions server-side and returns the "best" (the one with the highest log probability per token). Results cannot be streamed. When used with n, best_of controls the number of candidate completions and n specifies how many to return – best_of must be greater than n. **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_tokens and stop.

    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).

  6. 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

  7. 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_p but 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 temperature but not both.

  8. 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

  9. 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).

  10. final case class CreateEmbeddingResponse(object: String, model: String, data: Chunk[DataItem], usage: Usage) extends Product with Serializable

    CreateEmbeddingResponse model

  11. 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 purpose is 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.

  12. 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 specify classification_n_classes for multiclass classification or classification_positive_class for 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 suffix of "custom-model-name" would produce a model name like ada:ft-your-org:custom-model-name-2022-02-15-04-21-04.

  13. 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 image should be edited. Must be a valid PNG file, less than 4MB, and have the same dimensions as image.

    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, or 1024x1024.

    responseFormat

    The format in which the generated images are returned. Must be one of url or b64_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).

  14. 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, or 1024x1024.

    responseFormat

    The format in which the generated images are returned. Must be one of url or b64_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).

  15. 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, or 1024x1024.

    responseFormat

    The format in which the generated images are returned. Must be one of url or b64_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).

  16. 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-stable and text-moderation-latest. The default is text-moderation-latest which will be automatically upgraded over time. This ensures you are always using our most accurate model. If you use text-moderation-stable, we will provide advanced notice before updating the model. Accuracy of text-moderation-stable may be slightly lower than for text-moderation-latest.

  17. final case class CreateModerationResponse(id: String, model: String, results: Chunk[ResultsItem]) extends Product with Serializable

    CreateModerationResponse model

  18. 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 documents or a file, but not both.

    file

    The ID of an uploaded file that contains documents to search over. You should specify either documents or a file, but not both.

    maxRerank

    The maximum number of documents to be re-ranked and returned by search. This flag only takes effect when file is 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 when file is 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).

  19. 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

  20. final case class DeleteFileResponse(id: String, object: String, deleted: Boolean) extends Product with Serializable

    DeleteFileResponse model

  21. final case class DeleteModelResponse(id: String, object: String, deleted: Boolean) extends Product with Serializable

    DeleteModelResponse model

  22. final case class Engine(id: String, object: String, created: Optional[Int], ready: Boolean) extends Product with Serializable

    Engine model

  23. final case class Error(message: String, type: String, param: Option[String], code: Option[String]) extends Product with Serializable
  24. final case class ErrorResponse(error: Error) extends Product with Serializable
  25. type ExamplesItemItem = model.ExamplesItemItem.Type

    examples_item_item model

  26. final case class File(data: Chunk[Byte], fileName: String) extends Product with Serializable
  27. 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

  28. final case class FineTuneEvent(object: String, createdAt: Int, level: String, message: String) extends Product with Serializable

    FineTuneEvent model

  29. final case class ImagesResponse(created: Int, data: Chunk[DataItem]) extends Product with Serializable

    ImagesResponse model

  30. final case class ListEnginesResponse(object: String, data: Chunk[Engine]) extends Product with Serializable

    ListEnginesResponse model

  31. final case class ListFilesResponse(object: String, data: Chunk[OpenAIFile]) extends Product with Serializable

    ListFilesResponse model

  32. final case class ListFineTuneEventsResponse(object: String, data: Chunk[FineTuneEvent]) extends Product with Serializable

    ListFineTuneEventsResponse model

  33. final case class ListFineTunesResponse(object: String, data: Chunk[FineTune]) extends Product with Serializable

    ListFineTunesResponse model

  34. final case class ListModelsResponse(object: String, data: Chunk[Model]) extends Product with Serializable

    ListModelsResponse model

  35. type Logprobs = model.Logprobs.Type

    logprobs model

    logprobs model

    Include the log probabilities on the logprobs most likely tokens, as well the chosen tokens. For example, if logprobs is 5, the API will return a list of the 5 most likely tokens. The API will always return the logprob of the sampled token, so there may be up to logprobs+1 elements in the response.

    The maximum value for logprobs is 5. If you need more than this, please contact us through our [Help center](https://help.openai.com) and describe your use case.

    When logprobs is set, completion will be automatically added into expand to get the logprobs.

  36. final case class Model(id: String, object: String, created: Int, ownedBy: String) extends Product with Serializable

    Model model

  37. type N = model.N.Type

    n model

    n model

    The number of images to generate. Must be between 1 and 10.

  38. sealed trait OpenAIFailure extends AnyRef
  39. 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

  40. sealed trait ResponseFormat extends AnyRef

    response_format model

    response_format model

    The format in which the generated images are returned. Must be one of url or b64_json.

  41. sealed trait Size extends AnyRef

    size model

    size model

    The size of the generated images. Must be one of 256x256, 512x512, or 1024x1024.

  42. 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_p but not both.

  43. 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 temperature but not both.

Value Members

  1. object CreateAnswerRequest extends Serializable
  2. object CreateAnswerResponse extends Serializable
  3. object CreateClassificationRequest extends Serializable
  4. object CreateClassificationResponse extends Serializable
  5. object CreateCompletionRequest extends Serializable
  6. object CreateCompletionResponse extends Serializable
  7. object CreateEditRequest extends Serializable
  8. object CreateEditResponse extends Serializable
  9. object CreateEmbeddingRequest extends Serializable
  10. object CreateEmbeddingResponse extends Serializable
  11. object CreateFileRequest extends Serializable
  12. object CreateFineTuneRequest extends Serializable
  13. object CreateImageEditRequest extends Serializable
  14. object CreateImageRequest extends Serializable
  15. object CreateImageVariationRequest extends Serializable
  16. object CreateModerationRequest extends Serializable
  17. object CreateModerationResponse extends Serializable
  18. object CreateSearchRequest extends Serializable
  19. object CreateSearchResponse extends Serializable
  20. object DeleteFileResponse extends Serializable
  21. object DeleteModelResponse extends Serializable
  22. object Engine extends Serializable
  23. object Error extends Serializable
  24. object ErrorResponse extends Serializable
  25. object ExamplesItemItem extends Subtype[String]
  26. object File extends Serializable
  27. object FineTune extends Serializable
  28. object FineTuneEvent extends Serializable
  29. object ImagesResponse extends Serializable
  30. object ListEnginesResponse extends Serializable
  31. object ListFilesResponse extends Serializable
  32. object ListFineTuneEventsResponse extends Serializable
  33. object ListFineTunesResponse extends Serializable
  34. object ListModelsResponse extends Serializable
  35. object Logprobs extends Subtype[Int]
  36. object Model extends Serializable
  37. object N extends Subtype[Int]
  38. object OpenAIFailure
  39. object OpenAIFile extends Serializable
  40. object ResponseFormat
  41. object Size
  42. object Temperature extends Subtype[Double]
  43. object TopP extends Subtype[Double]

Inherited from AnyRef

Inherited from Any

Ungrouped