Class Choice
java.lang.Object
nl.dannyj.mistral.models.completion.Choice
Represents a choice in a chat completion response. A choice contains the generated assistant message and the reason the generation finished.
-
Constructor Summary
ConstructorsConstructorDescriptionChoice()
Choice
(int index, AssistantMessage message, FinishReason finishReason) Creates a newChoice
instance. -
Method Summary
-
Constructor Details
-
Choice
Creates a newChoice
instance.- Parameters:
index
- The index of the choice. Starts at 0.message
- The message that was generated.finishReason
- Reason for the completion to finish.
-
Choice
public Choice()
-
-
Method Details
-
getIndex
public int getIndex()The index of the choice. Starts at 0.- Returns:
- the index of the choice
-
getMessage
The message that was generated.- Returns:
- the assistant message that was generated
-
getFinishReason
Reason for the completion to finish.- Returns:
- the reason for the completion to finish
-
toString
-