Package com.intellijava.core.model
Class OpenaiLanguageResponse
java.lang.Object
com.intellijava.core.model.BaseRemoteModel
com.intellijava.core.model.OpenaiLanguageResponse
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
-
Nested Class Summary
Modifier and TypeClassDescriptionstatic class
A nested class for the API response's choice represents the model output.static class
Usage is a nested class that represents a Usage object returned in the API response. -
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionGets the choices propertylong
Gets the timestamp for the API response.getModel()
Gets the name of the language modelGets the object type of the API response.getUsage()
Gets the usage statistics for generating the API response.void
setChoices
(List<OpenaiLanguageResponse.Choice> choices) Sets the choices propertyvoid
setCreated
(long created) Sets the timestamp for the API response.void
Setsthe name of the language modelvoid
Sets the object type of the API response.void
Sets the usage statistics for generating the API response.Methods inherited from class com.intellijava.core.model.BaseRemoteModel
getId, setId
-
Constructor Details
-
OpenaiLanguageResponse
public OpenaiLanguageResponse()OpenaiLanguageResponse default constructor.
-
-
Method Details
-
getObject
Gets the object type of the API response.- Returns:
- the value of object property
-
setObject
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
Gets the name of the language model- Returns:
- the model id or name used to generate the API response
-
setModel
Setsthe name of the language model- Parameters:
model
- the model id or name used to generate the API response
-
getChoices
Gets the choices property- Returns:
- list of Choice objects that contain the generated completions and additional information
-
setChoices
Sets the choices property- Parameters:
choices
- list of Choice objects that contain the generated completions and additional information
-
getUsage
Gets the usage statistics for generating the API response.- Returns:
- the usage object that contains usage statistics of the API request
-
setUsage
Sets the usage statistics for generating the API response.- Parameters:
usage
- the usage object that contains usage statistics of the API request
-