Class OpenaiLanguageResponse

java.lang.Object
com.intellijava.core.model.BaseRemoteModel
com.intellijava.core.model.OpenaiLanguageResponse

public class OpenaiLanguageResponse extends BaseRemoteModel
OpenaiLanguageResponse is a model class used to parse the response from the OpenAI language API. choices and usage are nested classes.
Author:
github.com/Barqawiz
  • Constructor Details

    • OpenaiLanguageResponse

      public OpenaiLanguageResponse()
      OpenaiLanguageResponse default constructor.
  • Method Details

    • getObject

      public String getObject()
      Gets the object type of the API response.
      Returns:
      the value of object property
    • setObject

      public void setObject(String object)
      Sets the object type of the API response.
      Parameters:
      object - the new value of the object property
    • getCreated

      public long getCreated()
      Gets the timestamp for the API response.
      Returns:
      the value of created property
    • setCreated

      public void setCreated(long created)
      Sets the timestamp for the API response.
      Parameters:
      created - the timestamp when the API request was created.
    • getModel

      public String getModel()
      Gets the name of the language model
      Returns:
      the model id or name used to generate the API response
    • setModel

      public void setModel(String model)
      Setsthe name of the language model
      Parameters:
      model - the model id or name used to generate the API response
    • getChoices

      public List<OpenaiLanguageResponse.Choice> getChoices()
      Gets the choices property
      Returns:
      list of Choice objects that contain the generated completions and additional information
    • setChoices

      public void setChoices(List<OpenaiLanguageResponse.Choice> choices)
      Sets the choices property
      Parameters:
      choices - list of Choice objects that contain the generated completions and additional information
    • getUsage

      public OpenaiLanguageResponse.Usage getUsage()
      Gets the usage statistics for generating the API response.
      Returns:
      the usage object that contains usage statistics of the API request
    • setUsage

      public void setUsage(OpenaiLanguageResponse.Usage usage)
      Sets the usage statistics for generating the API response.
      Parameters:
      usage - the usage object that contains usage statistics of the API request