<ul data-eligibleForWebStory="true">Langchain4j introduces five ChatMessage types for LLM communication roles and purposes.UserMessage, AiMessage, ToolExecutionResultMessage, SystemMessage, and CustomMessage explained.Understanding these types is crucial for designing effective LLM integrations for diverse scenarios.The article also includes a practical example demonstrating the usage of ChatMessages.