Package io.dapr.client.domain
Class ToolMessage
java.lang.Object
io.dapr.client.domain.ToolMessage
- All Implemented Interfaces:
ConversationMessage
Tool message containing results from function/tool calls.
Used to provide the response from a tool execution back to the AI model.
-
Constructor Summary
ConstructorsConstructorDescriptionToolMessage(List<ConversationMessageContent> content) Creates a tool message with content. -
Method Summary
-
Constructor Details
-
ToolMessage
Creates a tool message with content.- Parameters:
content- the content containing the tool execution result
-
-
Method Details
-
getRole
Description copied from interface:ConversationMessageGets the role of the message sender.- Specified by:
getRolein interfaceConversationMessage- Returns:
- the message role
-
getName
Description copied from interface:ConversationMessageGets the name of the participant in the message.- Specified by:
getNamein interfaceConversationMessage- Returns:
- the participant name, or null if not specified
-
setToolId
Sets the tool identifier.- Parameters:
toolId- the tool identifier to set- Returns:
- this instance for method chaining
-
setName
Sets the name of the tool participant.- Parameters:
name- the name to set- Returns:
- this instance for method chaining
-
getContent
Description copied from interface:ConversationMessageGets the content of the message.- Specified by:
getContentin interfaceConversationMessage- Returns:
- the message content
-
getToolId
-