Packages

class OpenAISyncClient extends AnyRef

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

Value Members

  1. final def !=(arg0: Any): Boolean
    Definition Classes
    AnyRef → Any
  2. final def ##: Int
    Definition Classes
    AnyRef → Any
  3. final def ==(arg0: Any): Boolean
    Definition Classes
    AnyRef → Any
  4. final def asInstanceOf[T0]: T0
    Definition Classes
    Any
  5. def cancelFineTune(fineTuneId: String): FineTuneResponse

    Immediately cancel a fine-tune job.

    fineTuneId

    The ID of the fine-tune job to cancel.

  6. def clone(): AnyRef
    Attributes
    protected[lang]
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.CloneNotSupportedException]) @native() @HotSpotIntrinsicCandidate()
  7. def close(): Unit

    Closes and releases resources of http client if was not provided explicitly, otherwise works no-op.

  8. def createChatCompletion(chatBody: ChatBody): ChatResponse

    Creates a model response for the given chat conversation defined in chatBody.

    Creates a model response for the given chat conversation defined in chatBody.

    https://platform.openai.com/docs/api-reference/chat/create

    chatBody

    Chat request body.

  9. def createCompletion(completionBody: CompletionsBody): CompletionsResponse

    Creates a completion for the provided prompt and parameters given in request body.

    Creates a completion for the provided prompt and parameters given in request body.

    https://platform.openai.com/docs/api-reference/completions/create

    completionBody

    Create completion request body.

  10. def createEdit(editRequestBody: EditBody): EditResponse

    Creates a new edit for provided request body.

    Creates a new edit for provided request body.

    https://platform.openai.com/docs/api-reference/edits/create

    editRequestBody

    Edit request body.

  11. def createEmbeddings(embeddingsBody: EmbeddingsBody): EmbeddingResponse

    Gets info about the fine-tune job.

    embeddingsBody

    Embeddings request body.

  12. def createFineTune(fineTunesRequestBody: FineTunesRequestBody): FineTuneResponse

    Creates a job that fine-tunes a specified model from a given dataset.

    Creates a job that fine-tunes a specified model from a given dataset.

    https://platform.openai.com/docs/api-reference/fine-tunes/create

    fineTunesRequestBody

    Request body that will be used to create a fine-tune.

  13. def createImage(imageCreationBody: ImageCreationBody): ImageResponse

    Creates an image given a prompt in request body.

    Creates an image given a prompt in request body.

    https://platform.openai.com/docs/api-reference/images/create

    imageCreationBody

    Create image request body.

  14. def createModeration(moderationsBody: ModerationsBody): ModerationData

    Classifies if text violates OpenAI's Content Policy.

    Classifies if text violates OpenAI's Content Policy.

    https://platform.openai.com/docs/api-reference/moderations/create

    moderationsBody

    Moderation request body.

  15. def createTranscription(transcriptionConfig: TranscriptionConfig): AudioResponse

    Transcribes audio into the input language.

    Transcribes audio into the input language.

    transcriptionConfig

    An instance of the case class TranscriptionConfig containing the necessary parameters for the audio transcription

    returns

    An url to edited image.

  16. def createTranscription(systemPath: String, model: RecognitionModel): AudioResponse

    Transcribes audio into the input language.

    Transcribes audio into the input language.

    https://platform.openai.com/docs/api-reference/audio/create

    systemPath

    The audio systemPath to transcribe, in one of these formats: mp3, mp4, mpeg, mpga, m4a, wav, or webm.

    model

    ID of the model to use. Only whisper-1 is currently available.

  17. def createTranscription(file: File, model: RecognitionModel): AudioResponse

    Transcribes audio into the input language.

    Transcribes audio into the input language.

    https://platform.openai.com/docs/api-reference/audio/create

    file

    The audio file to transcribe, in one of these formats: mp3, mp4, mpeg, mpga, m4a, wav, or webm.

    model

    ID of the model to use. Only whisper-1 is currently available.

  18. def createTranslation(translationConfig: TranslationConfig): AudioResponse

    Translates audio into English text.

    translationConfig

    An instance of the case class TranslationConfig containing the necessary parameters for the audio translation.

  19. def createTranslation(systemPath: String, model: RecognitionModel): AudioResponse

    Translates audio into English text.

    systemPath

    The audio systemPath to transcribe, in one of these formats: mp3, mp4, mpeg, mpga, m4a, wav, or webm.

    model

    ID of the model to use. Only whisper-1 is currently available.

  20. def createTranslation(file: File, model: RecognitionModel): AudioResponse

    Translates audio into English text.

    file

    The audio file to translate, in one of these formats: mp3, mp4, mpeg, mpga, m4a, wav, or webm.

    model

    ID of the model to use. Only whisper-1 is currently available.

  21. def deleteFile(fileId: String): DeletedFileData

    Delete a file.

    fileId

    The ID of the file to use for this request.

  22. def deleteFineTuneModel(model: String): DeleteFineTuneModelResponse

    Delete a fine-tuned model.

    Delete a fine-tuned model. You must have the Owner role in your organization.

    https://platform.openai.com/docs/api-reference/fine-tunes/delete-model

    model

    The model to delete.

  23. final def eq(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef
  24. def equals(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef → Any
  25. final def getClass(): Class[_ <: AnyRef]
    Definition Classes
    AnyRef → Any
    Annotations
    @native() @HotSpotIntrinsicCandidate()
  26. def getFiles: FilesResponse

    Returns a list of files that belong to the user's organization.

    Returns a list of files that belong to the user's organization.

    https://platform.openai.com/docs/api-reference/files

  27. def getFineTuneEvents(fineTuneId: String): FineTuneEventsResponse

    Get fine-grained status updates for a fine-tune job.

    Get fine-grained status updates for a fine-tune job.

    https://platform.openai.com/docs/api-reference/fine-tunes/events

    fineTuneId

    The ID of the fine-tune job to get events for.

  28. def getFineTunes: GetFineTunesResponse

    List of your organization's fine-tuning jobs.

    List of your organization's fine-tuning jobs.

    https://platform.openai.com/docs/api-reference/fine-tunes/list

  29. def getModels: ModelsResponse

    Lists the currently available models, and provides basic information about each one such as the owner and availability.

    Lists the currently available models, and provides basic information about each one such as the owner and availability.

    https://platform.openai.com/docs/api-reference/models

  30. def hashCode(): Int
    Definition Classes
    AnyRef → Any
    Annotations
    @native() @HotSpotIntrinsicCandidate()
  31. def imageEdits(imageEditsConfig: ImageEditsConfig): ImageResponse

    Creates edited or extended images given an original image and a prompt.

    Creates edited or extended images given an original image and a prompt.

    https://platform.openai.com/docs/api-reference/images/create-edit

    imageEditsConfig

    An instance of the case class ImageEditConfig containing the necessary parameters for editing the image.

  32. def imageEdits(systemPath: String, prompt: String): ImageResponse

    Creates edited or extended images given an original image and a prompt.

    Creates edited or extended images given an original image and a prompt.

    https://platform.openai.com/docs/api-reference/images/create-edit

    systemPath

    Path to the image to be edited. 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

    prompt

    A text description of the desired image. The maximum length is 1000 characters.

  33. def imageEdits(image: File, prompt: String): ImageResponse

    Creates edited or extended images given an original image and a prompt.

    Creates edited or extended images given an original image and a prompt.

    https://platform.openai.com/docs/api-reference/images/create-edit

    image

    The image to be edited. 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.

    prompt

    A text description of the desired image. The maximum length is 1000 characters.

  34. def imageVariations(imageVariationsConfig: ImageVariationsConfig): ImageResponse

    Creates a variation of a given image.

    imageVariationsConfig

    An instance of the case class ImageVariationsConfig containing the necessary parameters for the image variation.

  35. def imageVariations(systemPath: String): ImageResponse

    Creates a variation of a given image.

    systemPath

    Path to the image to use as the basis for the variation. Must be a valid PNG file, less than 4MB, and square.

  36. def imageVariations(image: File): ImageResponse

    Creates a variation of a given image.

    image

    The image to use as the basis for the variation. Must be a valid PNG file, less than 4MB, and square.

  37. final def isInstanceOf[T0]: Boolean
    Definition Classes
    Any
  38. final def ne(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef
  39. final def notify(): Unit
    Definition Classes
    AnyRef
    Annotations
    @native() @HotSpotIntrinsicCandidate()
  40. final def notifyAll(): Unit
    Definition Classes
    AnyRef
    Annotations
    @native() @HotSpotIntrinsicCandidate()
  41. def retrieveFile(fileId: String): FileData

    Returns information about a specific file.

    Returns information about a specific file.

    https://platform.openai.com/docs/api-reference/files/retrieve

    fileId

    The ID of the file to use for this request.

  42. def retrieveFileContent(fileId: String): String

    Returns the contents of the specified file.

    fileId

    The ID of the file.

  43. def retrieveFineTune(fineTuneId: String): FineTuneResponse

    Gets info about the fine-tune job.

    fineTuneId

    The ID of the fine-tune job.

  44. def retrieveModel(modelId: String): ModelData

    Retrieves a model instance, providing basic information about the model such as the owner and permissions.

    Retrieves a model instance, providing basic information about the model such as the owner and permissions.

    https://platform.openai.com/docs/api-reference/models/retrieve

    modelId

    The ID of the model to use for this request.

  45. final def synchronized[T0](arg0: => T0): T0
    Definition Classes
    AnyRef
  46. def toString(): String
    Definition Classes
    AnyRef → Any
  47. def uploadFile(systemPath: String): FileData

    Upload a file that contains document(s) to be used across various endpoints/features.

    Upload a file that contains document(s) to be used across various endpoints/features. Currently, the size of all the files uploaded by one organization can be up to 1 GB. Please contact OpenAI if you need to increase the storage limit.

    https://platform.openai.com/docs/api-reference/files/upload

    systemPath

    Path to the JSON Lines file to be uploaded and the purpose is set to "fine-tune", each line is a JSON record with "prompt" and "completion" fields representing your training examples.

  48. def uploadFile(systemPath: String, purpose: String): FileData

    Upload a file that contains document(s) to be used across various endpoints/features.

    Upload a file that contains document(s) to be used across various endpoints/features. Currently, the size of all the files uploaded by one organization can be up to 1 GB. Please contact OpenAI if you need to increase the storage limit.

    https://platform.openai.com/docs/api-reference/files/upload

    systemPath

    Path to the JSON Lines 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.

    purpose

    The intended purpose of the uploaded documents. Use "fine-tune" for Fine-tuning. This allows OpenAI to validate the format of the uploaded file.

  49. def uploadFile(file: File): FileData

    Upload a file that contains document(s) to be used across various endpoints/features.

    Upload a file that contains document(s) to be used across various endpoints/features. Currently, the size of all the files uploaded by one organization can be up to 1 GB. Please contact OpenAI if you need to increase the storage limit.

    https://platform.openai.com/docs/api-reference/files/upload

    file

    JSON Lines file to be uploaded and the purpose is set to "fine-tune", each line is a JSON record with "prompt" and "completion" fields representing your training examples.

  50. def uploadFile(file: File, purpose: String): FileData

    Upload a file that contains document(s) to be used across various endpoints/features.

    Upload a file that contains document(s) to be used across various endpoints/features. Currently, the size of all the files uploaded by one organization can be up to 1 GB. Please contact OpenAI if you need to increase the storage limit.

    https://platform.openai.com/docs/api-reference/files/upload

    file

    JSON Lines 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.

    purpose

    The intended purpose of the uploaded documents. Use "fine-tune" for Fine-tuning. This allows OpenAI to validate the format of the uploaded file.

  51. final def wait(arg0: Long, arg1: Int): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.InterruptedException])
  52. final def wait(arg0: Long): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.InterruptedException]) @native()
  53. final def wait(): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.InterruptedException])

Deprecated Value Members

  1. def finalize(): Unit
    Attributes
    protected[lang]
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.Throwable]) @Deprecated
    Deprecated

Inherited from AnyRef

Inherited from Any

Ungrouped