Class ChatModelResponseContext
java.lang.Object
dev.langchain4j.model.chat.listener.ChatModelResponseContext
The response context. It contains
ChatResponse
, corresponding ChatRequest
and attributes.
The attributes can be used to pass data between methods of a ChatModelListener
or between multiple ChatModelListener
s.-
Constructor Summary
ConstructorsConstructorDescriptionChatModelResponseContext
(ChatModelResponse response, ChatModelRequest request, Map<Object, Object> attributes) Deprecated, for removal: This API element is subject to removal in a future version.ChatModelResponseContext
(ChatResponse chatResponse, ChatRequest chatRequest, Map<Object, Object> attributes) -
Method Summary
Modifier and TypeMethodDescriptionrequest()
Deprecated, for removal: This API element is subject to removal in a future version.please usechatRequest()
insteadresponse()
Deprecated, for removal: This API element is subject to removal in a future version.please usechatResponse()
instead
-
Constructor Details
-
ChatModelResponseContext
public ChatModelResponseContext(ChatResponse chatResponse, ChatRequest chatRequest, Map<Object, Object> attributes) -
ChatModelResponseContext
@Deprecated(forRemoval=true) public ChatModelResponseContext(ChatModelResponse response, ChatModelRequest request, Map<Object, Object> attributes) Deprecated, for removal: This API element is subject to removal in a future version.please useChatModelResponseContext(ChatResponse, ChatRequest, Map)
instead
-
-
Method Details
-
chatResponse
-
response
Deprecated, for removal: This API element is subject to removal in a future version.please usechatResponse()
instead -
chatRequest
-
request
Deprecated, for removal: This API element is subject to removal in a future version.please usechatRequest()
instead -
attributes
- Returns:
- The attributes map. It can be used to pass data between methods of a
ChatModelListener
or between multipleChatModelListener
s.
-
ChatModelResponseContext(ChatResponse, ChatRequest, Map)
instead