Package dev.langchain4j.mcp.client
Class McpPromptMessage
java.lang.Object
dev.langchain4j.mcp.client.McpPromptMessage
The 'PromptMessage' object from the MCP protocol schema.
This can be directly translated to a ChatMessage object from the LangChain4j API.
-
Constructor Details
-
McpPromptMessage
-
-
Method Details
-
toChatMessage
Converts this MCP-specific PromptMessage representation to a ChatMessage object from the core LangChain4j API, if possible. This is currently not possible if the role is "assistant" AND the content is something other than text.- Throws:
UnsupportedOperationException
- if the role is 'assistant' and the content is something other than text.
-
role
-
content
-
equals
-
hashCode
public int hashCode() -
toString
-