Class ModelsClient
java.lang.Object
io.github.stefanbratanov.jvm.openai.ModelsClient
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
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected final HttpClient
protected final com.fasterxml.jackson.databind.ObjectMapper
-
Method Summary
Modifier and TypeMethodDescriptiondeleteModel
(String model) Delete a fine-tuned model.Lists the currently available models, and provides basic information about each one such as the owner and availability.retrieveModel
(String model) Retrieves a model instance, providing basic information about the model such as the owner and permissioning.
-
Field Details
-
httpClient
-
objectMapper
protected final com.fasterxml.jackson.databind.ObjectMapper objectMapper
-
-
Method Details
-
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
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
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
-