Interface OpenAIChatResponse
-
public interface OpenAIChatResponseRepresents the response from the OpenAI chat completion API.
-
-
Nested Class Summary
Nested Classes Modifier and Type Interface Description static interfaceOpenAIChatResponse.ChoiceRepresents a choice in the chat completion response.static interfaceOpenAIChatResponse.FinishDetailsRepresents the finish details in the chat completion response.static interfaceOpenAIChatResponse.MessageRepresents a message in the chat completion response.static interfaceOpenAIChatResponse.UsageRepresents the usage of the chat completion API.
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description List<OpenAIChatResponse.Choice>getChoices()Gets the choices of the chat completion response.LonggetCreated()Gets the created time of the chat completion response.StringgetId()Gets the id of the chat completion response.StringgetModel()Gets the model of the chat completion response.StringgetObject()Gets the object of the chat completion response.List<OpenAIChatResponse.Usage>getUsage()Gets the usage of the chat completion response.
-
-
-
Method Detail
-
getId
String getId()
Gets the id of the chat completion response.- Returns:
- the id of the chat completion response
-
getObject
String getObject()
Gets the object of the chat completion response.- Returns:
- the object of the chat completion response
-
getCreated
Long getCreated()
Gets the created time of the chat completion response.- Returns:
- the created time of the chat completion response
-
getModel
String getModel()
Gets the model of the chat completion response.- Returns:
- the model of the chat completion response
-
getUsage
List<OpenAIChatResponse.Usage> getUsage()
Gets the usage of the chat completion response.- Returns:
- the usage of the chat completion response
-
getChoices
List<OpenAIChatResponse.Choice> getChoices()
Gets the choices of the chat completion response.- Returns:
- the choices of the chat completion response
-
-