Serialized Form

  • Package xyz.felh.openai

  • Package xyz.felh.openai.audio

    • Class xyz.felh.openai.audio.AudioResponse

      class AudioResponse extends Object implements Serializable
      • Serialized Fields

    • Class xyz.felh.openai.audio.CreateAudioTranscriptionRequest

      class CreateAudioTranscriptionRequest extends CreateAudioTranslationRequest implements Serializable
      • Serialized Fields

        • language
          String language
          Optional The language of the input audio. Supplying the input language in ISO-639-1 format will improve accuracy and latency.
    • Class xyz.felh.openai.audio.CreateAudioTranslationRequest

      class CreateAudioTranslationRequest extends Object implements Serializable
      • Serialized Fields

        • file
          byte[] file
        • filePath
          String filePath
          Required must set filePath or file The audio file to transcribe, in one of these formats: mp3, mp4, mpeg, mpga, m4a, wav, or webm.
        • model
          @NonNull String model
          Required ID of the model to use. Only whisper-1 is currently available.
        • prompt
          String prompt
          Optional An optional text to guide the model's style or continue a previous audio segment. The prompt should match the audio language.
        • responseFormat
          String responseFormat
          Optional Defaults to json The format of the transcript output, in one of these options: json, text, srt, verbose_json, or vtt.
        • temperature
          Double temperature
          Optional Defaults to 0 The sampling temperature, between 0 and 1. Higher values like 0.8 will make the output more random, while lower values like 0.2 will make it more focused and deterministic. If set to 0, the model will use log probability to automatically increase the temperature until certain thresholds are hit.
  • Package xyz.felh.openai.completion

    • Class xyz.felh.openai.completion.BaseCreateCompletionRequest

      class BaseCreateCompletionRequest extends Object implements Serializable
      • Serialized Fields

        • frequencyPenalty
          Double 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. Optional Defaults to 0
        • logitBias
          Map<String,Integer> 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 (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.

          Optional Defaults to null

        • maxTokens
          Integer maxTokens
          The maximum number of tokens 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). Optional Defaults to 16
        • model
          @NonNull String model
          ID of the model to use. Currently, only gpt-3.5-turbo and gpt-3.5-turbo-0301 are supported.
        • n
          Integer 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. Optional Defaults to 1
        • presencePenalty
          Double 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. Optional Defaults to 0
        • stop
          String stop
          Up to 4 sequences where the API will stop generating further tokens. The returned text will not contain the stop sequence. string or array Optional Defaults to null
        • stream
          Boolean stream
          Whether to stream back partial progress. If set, tokens will be sent as data-only server-sent events as they become available, with the stream terminated by a data: [DONE] message. Optional Defaults to false
        • temperature
          Double temperature
          What sampling temperature to use, between 0 and 2. Higher values like 0.8 will make the output more random, while lower values like 0.2 will make it more focused and deterministic. We generally recommend altering this or top_p but not both. Optional Defaults to 1
        • topP
          Double 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. Optional Defaults to 1
        • user
          String user
          A unique identifier representing your end-user, which can help OpenAI to monitor and detect abuse. Learn more. Optional
    • Class xyz.felh.openai.completion.Completion

      class Completion extends OpenAiApiObjectWithId implements Serializable
    • Class xyz.felh.openai.completion.CompletionChoice

      class CompletionChoice extends Object implements Serializable
    • Class xyz.felh.openai.completion.CreateCompletionRequest

      class CreateCompletionRequest extends BaseCreateCompletionRequest implements Serializable
      • Serialized Fields

        • bestOf
          Integer 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. Optional Defaults to 1
        • echo
          Boolean echo
          Echo back the prompt in addition to the completion Optional Defaults to false
        • logprobs
          Integer 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 and describe your use case. Optional Defaults to null
        • prompt
          String 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. string or array Optional Defaults to <|endoftext|>
        • suffix
          String suffix
          The suffix that comes after a completion of inserted text. Optional Defaults to null
    • Class xyz.felh.openai.completion.Logprobs

      class Logprobs extends Object implements Serializable
  • Package xyz.felh.openai.completion.chat

  • Package xyz.felh.openai.embedding

  • Package xyz.felh.openai.file

  • Package xyz.felh.openai.fineTuning

    • Class xyz.felh.openai.fineTuning.CreateFineTuningJobRequest

      class CreateFineTuningJobRequest extends Object implements Serializable
      • Serialized Fields

        • hyperparameters
          Hyperparameters hyperparameters
          Optional The hyperparameters used for the fine-tuning job.
        • model
          @NonNull String model
          The name of the model to fine-tune. You can select one of the supported models.
        • suffix
          String suffix
          Optional Defaults to null

          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 ft:gpt-3.5-turbo:openai:custom-model-name:7p4lURel.

        • trainingFile
          @NonNull String trainingFile
          The ID of an uploaded file that contains training data. Your dataset must be formatted as a JSONL file. Additionally, you must upload your file with the purpose fine-tune.
        • validationFile
          String validationFile
          Optional

          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. The same data should not be present in both train and validation files.

          Your dataset must be formatted as a JSONL file. You must upload your file with the purpose fine-tune.

    • Class xyz.felh.openai.fineTuning.FineTuningJob

      class FineTuningJob extends OpenAiApiObjectWithId implements Serializable
      • Serialized Fields

        • createdAt
          Long createdAt
          The unix timestamp for when the fine-tuning job was created.
        • fineTunedModel
          String fineTunedModel
          The name of the fine-tuned model that is being created.
        • finishedAt
          Long finishedAt
          The unix timestamp for when the fine-tuning job was finished.
        • hyperparameters
          Hyperparameters hyperparameters
          The hyperparameters used for the fine-tuning job.
        • model
          String model
          The base model that is being fine-tuned.
        • organizationId
          String organizationId
          The organization that owns the fine-tuning job.
        • resultFiles
          List<String> resultFiles
          The compiled results files for the fine-tuning job.
        • status
          String status
          The current status of the fine-tuning job, which can be either created, pending, running, succeeded, failed, or cancelled.
        • trainedTokens
          Long trainedTokens
          The total number of billable tokens processed by this fine tuning job.
        • trainingFile
          String trainingFile
          The file ID used for training.
        • validationFile
          String validationFile
          string or null The file ID used for validation.
    • Class xyz.felh.openai.fineTuning.FineTuningJobEvent

      class FineTuningJobEvent extends OpenAiApiObjectWithId implements Serializable
    • Class xyz.felh.openai.fineTuning.Hyperparameters

      class Hyperparameters extends Object implements Serializable
      • Serialized Fields

        • nEpochs
          String nEpochs
          The number of epochs to train the model for. An epoch refers to one full cycle through the training dataset. "Auto" decides the optimal number of epochs based on the size of the dataset. If setting the number manually, we support any number between 1 and 50 epochs.
  • Package xyz.felh.openai.image

  • Package xyz.felh.openai.image.edit

    • Class xyz.felh.openai.image.edit.CreateImageEditRequest

      class CreateImageEditRequest extends BaseCreateImageRequest implements Serializable
      • Serialized Fields

        • image
          byte[] image
        • imagePath
          String imagePath
          Required image or imagePath 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
          byte[] mask
          Optional 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.
        • maskPath
          String maskPath
        • prompt
          @NonNull String prompt
          Required A text description of the desired image(s). The maximum length is 1000 characters.
  • Package xyz.felh.openai.image.variation

  • Package xyz.felh.openai.model

  • Package xyz.felh.openai.moderation

    • Class xyz.felh.openai.moderation.CreateModerationRequest

      class CreateModerationRequest extends Object implements Serializable
      • Serialized Fields

        • input
          @NonNull String input
          The input text to classify
        • model
          String model
          Optional Defaults to text-moderation-latest 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.

    • Class xyz.felh.openai.moderation.CreateModerationResponse

      class CreateModerationResponse extends Object implements Serializable
    • Class xyz.felh.openai.moderation.Moderation

      class Moderation extends Object implements Serializable
      • Serialized Fields

        • categories
          ModerationCategories categories
          Object containing per-category binary content policy violation flags. For each category, the value is true if the model flags the corresponding category as violated, false otherwise.
        • categoryScores
          ModerationCategoryScores categoryScores
          Object containing per-category raw scores output by the model, denoting the model's confidence that the input violates the OpenAI's policy for the category. The value is between 0 and 1, where higher values denote higher confidence. The scores should not be interpreted as probabilities.
        • flagged
          Boolean flagged
          Set to true if the model classifies the content as violating OpenAI's content policy, false otherwise
    • Class xyz.felh.openai.moderation.ModerationCategories

      class ModerationCategories extends Object implements Serializable
      • Serialized Fields

        • hate
          boolean hate
        • hateThreatening
          boolean hateThreatening
        • selfHarm
          boolean selfHarm
        • sexual
          boolean sexual
        • sexualMinors
          boolean sexualMinors
        • violence
          boolean violence
        • violenceGraphic
          boolean violenceGraphic
    • Class xyz.felh.openai.moderation.ModerationCategoryScores

      class ModerationCategoryScores extends Object implements Serializable
      • Serialized Fields

        • hate
          double hate
        • hateThreatening
          double hateThreatening
        • selfHarm
          double selfHarm
        • sexual
          double sexual
        • sexualMinors
          double sexualMinors
        • violence
          double violence
        • violenceGraphic
          double violenceGraphic