Class ChatCompletionMessage
- java.lang.Object
-
- com.composum.ai.backend.base.service.chat.impl.chatmodel.ChatCompletionMessage
-
public class ChatCompletionMessage extends Object
Represents a message in a chat completion request, containing the role of the speaker (user, assistant, or system) and the message content, which may include text or other parts.
-
-
Constructor Summary
Constructors Constructor Description ChatCompletionMessage()
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description List<ChatCompletionMessagePart>
getContent()
ChatCompletionRequest.Role
getRole()
String
getToolCallId()
List<ChatCompletionToolCall>
getToolCalls()
boolean
isEmpty(Void ignoreJustPreventSerialization)
static ChatCompletionMessage
make(GPTChatMessage message)
void
setContent(List<ChatCompletionMessagePart> content)
void
setRole(ChatCompletionRequest.Role role)
void
setToolCallId(String toolCallId)
void
setToolCalls(List<ChatCompletionToolCall> toolCalls)
-
-
-
Method Detail
-
make
public static ChatCompletionMessage make(GPTChatMessage message)
-
getRole
public ChatCompletionRequest.Role getRole()
-
setRole
public void setRole(ChatCompletionRequest.Role role)
-
getToolCallId
public String getToolCallId()
-
setToolCallId
public void setToolCallId(String toolCallId)
-
getContent
public List<ChatCompletionMessagePart> getContent()
-
setContent
public void setContent(List<ChatCompletionMessagePart> content)
-
getToolCalls
public List<ChatCompletionToolCall> getToolCalls()
-
setToolCalls
public void setToolCalls(List<ChatCompletionToolCall> toolCalls)
-
isEmpty
public boolean isEmpty(Void ignoreJustPreventSerialization)
-
-