Class ChatModelResponseContext
java.lang.Object
dev.langchain4j.model.chat.listener.ChatModelResponseContext
The response context. It contains
ChatModelResponse
, corresponding ChatModelRequest
and attributes.
The attributes can be used to pass data between methods of a ChatModelListener
or between multiple ChatModelListener
s.-
Constructor Summary
ConstructorDescriptionChatModelResponseContext
(ChatModelResponse response, ChatModelRequest request, Map<Object, Object> attributes) -
Method Summary
-
Constructor Details
-
ChatModelResponseContext
public ChatModelResponseContext(ChatModelResponse response, ChatModelRequest request, Map<Object, Object> attributes)
-
-
Method Details
-
response
- Returns:
- The response from the
ChatLanguageModel
.
-
request
- Returns:
- The request to the
ChatLanguageModel
the response corresponds to.
-
attributes
- Returns:
- The attributes map. It can be used to pass data between methods of a
ChatModelListener
or between multipleChatModelListener
s.
-