Class ChatModelResponseContext
java.lang.Object
dev.langchain4j.model.chat.listener.ChatModelResponseContext
The chat response context.
It contains
ChatResponse
, corresponding ChatRequest
, ModelProvider
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, ModelProvider modelProvider, Map<Object, Object> attributes) Deprecated, for removal: This API element is subject to removal in a future version.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, ModelProvider, Map)
insteadChatModelResponseContext
(ChatResponse chatResponse, ChatRequest chatRequest, ModelProvider modelProvider, Map<Object, Object> attributes) ChatModelResponseContext
(ChatResponse chatResponse, ChatRequest chatRequest, Map<Object, Object> attributes) Deprecated, for removal: This API element is subject to removal in a future version.please useChatModelResponseContext(ChatResponse, ChatRequest, ModelProvider, Map)
instead -
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, ModelProvider modelProvider, Map<Object, Object> attributes) -
ChatModelResponseContext
@Deprecated(forRemoval=true) public ChatModelResponseContext(ChatResponse chatResponse, ChatRequest chatRequest, Map<Object, Object> attributes) Deprecated, for removal: This API element is subject to removal in a future version.please useChatModelResponseContext(ChatResponse, ChatRequest, ModelProvider, Map)
instead -
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, ModelProvider, Map)
instead -
ChatModelResponseContext
@Deprecated(forRemoval=true) public ChatModelResponseContext(ChatModelResponse response, ChatModelRequest request, ModelProvider modelProvider, Map<Object, Object> attributes) Deprecated, for removal: This API element is subject to removal in a future version.please useChatModelResponseContext(ChatResponse, ChatRequest, ModelProvider, 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 -
modelProvider
-
attributes
- Returns:
- The attributes map. It can be used to pass data between methods of a
ChatModelListener
or between multipleChatModelListener
s.
-
ChatModelResponseContext(ChatResponse, ChatRequest, ModelProvider, Map)
instead