Class ModelsClient

java.lang.Object
io.github.stefanbratanov.jvm.openai.ModelsClient

public final class ModelsClient extends Object
List and describe the various models available in the API. You can refer to the Models documentation to understand what models are available and the differences between them.

Based on Models

  • Method Details

    • listModels

      public List<Model> listModels()
      Lists the currently available models, and provides basic information about each one such as the owner and availability.
      Throws:
      OpenAIException - in case of API errors
    • retrieveModel

      public Model retrieveModel(String model)
      Retrieves a model instance, providing basic information about the model such as the owner and permissioning.
      Parameters:
      model - The ID of the model to use for this request
      Throws:
      OpenAIException - in case of API errors
    • deleteModel

      public DeletionStatus deleteModel(String model)
      Delete a fine-tuned model. You must have the Owner role in your organization to delete a model.
      Parameters:
      model - The model to delete
      Throws:
      OpenAIException - in case of API errors