Class ChatExchange
java.lang.Object
dev.langchain4j.guardrail.ChatExchange
A request sent to a chat model and the response it returned. When a response is the result of a tool-calling loop,
the request is the last one sent to the model: its messages include the tool calls and tool results of all rounds.
The request is
null when it is not known, for example when a ChatExecutor does not override
ChatExecutor.exchange(List).- Since:
- 1.23.0
-
Constructor Details
-
ChatExchange
- Parameters:
request- the request sent to the model, ornullif it is not knownresponse- the response of the model
-
-
Method Details
-
request
- Returns:
- the request sent to the model, or
nullif it is not known
-
response
- Returns:
- the response of the model
-
equals
-
hashCode
-
toString
-