Class ChatChoice
java.lang.Object
io.agentscope.core.chat.completions.model.ChatChoice
Single choice in a Chat Completions style response.
This class follows OpenAI's Chat Completions API format.
Example:
{
"index": 0,
"message": {
"role": "assistant",
"content": "Hello! How can I help you?"
},
"finish_reason": "stop"
}
Possible finish_reason values:
- "stop" - Natural end of message
- "length" - Max tokens reached
- "tool_calls" - Model wants to call tools
- "content_filter" - Content was filtered
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptiongetDelta()intgetIndex()voidsetDelta(ChatMessage delta) voidsetFinishReason(String finishReason) voidsetIndex(int index) voidsetLogprobs(Object logprobs) voidsetMessage(ChatMessage message)
-
Constructor Details
-
ChatChoice
public ChatChoice()
-
-
Method Details
-
getIndex
public int getIndex() -
setIndex
public void setIndex(int index) -
getMessage
-
setMessage
-
getDelta
-
setDelta
-
getFinishReason
-
setFinishReason
-
getLogprobs
-
setLogprobs
-