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 ChatCompletionChoiceMessage
getDelta()
Alternative togetMessage()
if it's a response chunk.ChatCompletionResponse.FinishReason
getFinishReason()
int
getIndex()
ChatCompletionChoiceMessage
getMessage()
void
setDelta(ChatCompletionChoiceMessage delta)
void
setFinishReason(ChatCompletionResponse.FinishReason finishReason)
void
setIndex(int index)
void
setMessage(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)
-
-