Class ConversationContext
java.lang.Object
dev.langchain4j.test.judge.ConversationContext
- All Implemented Interfaces:
JudgeContext
A
JudgeContext with the conversation that the judged text answers, for example the messages of the last
request an AI Service sent to the chat model: its system message, the messages from its chat memory, the user
message and the tool calls and results. It lets the judge check criteria that refer to the conversation, such as
"uses only facts from the tool results".-
Method Summary
Modifier and TypeMethodDescriptionbooleanstatic ConversationContextfrom(List<? extends ChatMessage> conversation) Creates a context with the given conversation.inthashCode()messages()The messages of the conversation, in order.toString()
-
Method Details
-
from
Creates a context with the given conversation.- Throws:
IllegalArgumentException- if the conversation is empty or containsnull
-
messages
The messages of the conversation, in order. Never empty, immutable. -
equals
-
hashCode
-
toString
-