Class ChatCompletionChoice
- java.lang.Object
 - 
- com.composum.ai.backend.base.service.chat.impl.chatmodel.ChatCompletionChoice
 
 
- 
public class ChatCompletionChoice extends Object
Represents a choice in the chat completion response. Each choice may include a message, a delta (for streaming responses), and a finish reason indicating why the completion stopped. 
- 
- 
Constructor Summary
Constructors Constructor Description ChatCompletionChoice() 
- 
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description ChatCompletionChoiceMessagegetDelta()Alternative togetMessage()if it's a response chunk.ChatCompletionResponse.FinishReasongetFinishReason()intgetIndex()ChatCompletionChoiceMessagegetMessage()voidsetDelta(ChatCompletionChoiceMessage delta)voidsetFinishReason(ChatCompletionResponse.FinishReason finishReason)voidsetIndex(int index)voidsetMessage(ChatCompletionChoiceMessage message) 
 - 
 
- 
- 
Method Detail
- 
getIndex
public int getIndex()
 
- 
setIndex
public void setIndex(int index)
 
- 
getMessage
public ChatCompletionChoiceMessage getMessage()
 
- 
setMessage
public void setMessage(ChatCompletionChoiceMessage message)
 
- 
getDelta
public ChatCompletionChoiceMessage getDelta()
Alternative togetMessage()if it's a response chunk. 
- 
setDelta
public void setDelta(ChatCompletionChoiceMessage delta)
 
- 
getFinishReason
public ChatCompletionResponse.FinishReason getFinishReason()
 
- 
setFinishReason
public void setFinishReason(ChatCompletionResponse.FinishReason finishReason)
 
 - 
 
 -