Class Choice

java.lang.Object
nl.dannyj.mistral.models.completion.Choice

public class Choice extends Object
Represents a choice in a chat completion. A choice contains the message that was generated and the reason for the completion to finish.
  • Constructor Details

    • Choice

      public Choice(int index, Message message, String finishReason, String logProbs)
    • Choice

      public Choice()
  • Method Details

    • getIndex

      public int getIndex()
      The index of the choice. Starts at 0.
      Returns:
      the index of the choice
    • getMessage

      public Message getMessage()
      The message that was generated.
      Returns:
      the message that was generated
    • getFinishReason

      public String getFinishReason()
      Reason for the completion to finish.
      Returns:
      the reason for the completion to finish
    • getLogProbs

      public String getLogProbs()
    • toString

      public String toString()
      Overrides:
      toString in class Object