Class ConversationResultChoices

java.lang.Object
io.dapr.client.domain.ConversationResultChoices

public class ConversationResultChoices extends Object
Represents a conversation result choice with finish reason, index, and message.
  • Constructor Details

    • ConversationResultChoices

      public ConversationResultChoices(String finishReason, long index, ConversationResultMessage message)
      Constructor.
      Parameters:
      finishReason - the reason the model stopped generating tokens
      index - the index of the choice in the list of choices
      message - the result message
  • Method Details

    • getFinishReason

      public String getFinishReason()
      Gets the reason the model stopped generating tokens. This will be "stop" if the model hit a natural stop point or a provided stop sequence, "length" if the maximum number of tokens specified in the request was reached, "content_filter" if content was omitted due to a flag from content filters, "tool_calls" if the model called a tool.
      Returns:
      the finish reason
    • getIndex

      public long getIndex()
      Gets the index of the choice in the list of choices.
      Returns:
      the index
    • getMessage

      public ConversationResultMessage getMessage()
      Gets the result message.
      Returns:
      the message