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
Nested ClassesModifier and TypeClassDescriptionstatic classA nested class for the API response's choice represents the model output.static classUsage is a nested class that represents a Usage object returned in the API response. -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionGets the choices propertylongGets 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.voidsetChoices(List<OpenaiLanguageResponse.Choice> choices) Sets the choices propertyvoidsetCreated(long created) Sets the timestamp for the API response.voidSetsthe name of the language modelvoidSets the object type of the API response.voidSets 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
-