Class MessagesInput
java.lang.Object
dev.langchain4j.model.decision.request.MessagesInput
- All Implemented Interfaces:
DecisionInput
A
DecisionInput that is a conversation: messages in the order they were exchanged, for example a chat
between a user and an AI assistant, including the tools the assistant called
(AiMessage.toolExecutionRequests()) and their results
(ToolExecutionResultMessage). Which kinds of messages and contents are
supported depends on the decision model.- Since:
- 1.23.0
-
Method Summary
Modifier and TypeMethodDescriptionbooleanstatic MessagesInputfrom(List<? extends ChatMessage> messages) Creates the input from a copy of the given messages.inthashCode()messages()The messages, in order.toString()type()The type of this input.
-
Method Details
-
from
Creates the input from a copy of the given messages.- Throws:
IllegalArgumentException- ifmessagesisnullor empty, or containsnull
-
messages
The messages, in order. The list is unmodifiable. -
type
Description copied from interface:DecisionInputThe type of this input.- Specified by:
typein interfaceDecisionInput
-
equals
-
hashCode
-
toString
-