Package io.dapr.client.domain
Class ConversationResultChoices
java.lang.Object
io.dapr.client.domain.ConversationResultChoices
Represents a conversation result choice with finish reason, index, and message.
-
Constructor Summary
ConstructorsConstructorDescriptionConversationResultChoices(String finishReason, long index, ConversationResultMessage message) Constructor. -
Method Summary
Modifier and TypeMethodDescriptionGets the reason the model stopped generating tokens.longgetIndex()Gets the index of the choice in the list of choices.Gets the result message.
-
Constructor Details
-
ConversationResultChoices
public ConversationResultChoices(String finishReason, long index, ConversationResultMessage message) Constructor.- Parameters:
finishReason- the reason the model stopped generating tokensindex- the index of the choice in the list of choicesmessage- the result message
-
-
Method Details
-
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
Gets the result message.- Returns:
- the message
-