public class ChatMessageAccumulator
extends java.lang.Object
| Constructor and Description |
|---|
ChatMessageAccumulator(com.theokanning.openai.completion.chat.ChatMessage messageChunk,
com.theokanning.openai.completion.chat.ChatMessage accumulatedMessage)
Constructor that initializes the message chunk and accumulated message.
|
| Modifier and Type | Method and Description |
|---|---|
com.theokanning.openai.completion.chat.ChatFunctionCall |
getAccumulatedChatFunctionCall()
Retrieves the function call from the accumulated message.
|
com.theokanning.openai.completion.chat.ChatMessage |
getAccumulatedMessage()
Retrieves the accumulated message.
|
com.theokanning.openai.completion.chat.ChatFunctionCall |
getChatFunctionCallChunk()
Retrieves the function call from the message chunk.
|
com.theokanning.openai.completion.chat.ChatMessage |
getMessageChunk()
Retrieves the message chunk.
|
boolean |
isChatMessage()
Checks if the accumulated message contains a chat message.
|
boolean |
isFunctionCall()
Checks if the accumulated message contains a function call.
|
public ChatMessageAccumulator(com.theokanning.openai.completion.chat.ChatMessage messageChunk,
com.theokanning.openai.completion.chat.ChatMessage accumulatedMessage)
messageChunk - The message chunk.accumulatedMessage - The accumulated message.public boolean isFunctionCall()
public boolean isChatMessage()
public com.theokanning.openai.completion.chat.ChatMessage getMessageChunk()
public com.theokanning.openai.completion.chat.ChatMessage getAccumulatedMessage()
public com.theokanning.openai.completion.chat.ChatFunctionCall getChatFunctionCallChunk()
public com.theokanning.openai.completion.chat.ChatFunctionCall getAccumulatedChatFunctionCall()