Class ChatModelErrorContext
java.lang.Object
dev.langchain4j.model.chat.listener.ChatModelErrorContext
The error context. It contains the error, corresponding
ChatRequest
and attributes.
The attributes can be used to pass data between methods of a ChatModelListener
or between multiple ChatModelListener
s.-
Constructor Summary
ConstructorsConstructorDescriptionChatModelErrorContext
(Throwable error, ChatModelRequest request, ChatModelResponse partialResponse, Map<Object, Object> attributes) Deprecated, for removal: This API element is subject to removal in a future version.ChatModelErrorContext
(Throwable error, ChatRequest chatRequest, Map<Object, Object> attributes) -
Method Summary
Modifier and TypeMethodDescriptionerror()
Deprecated, for removal: This API element is subject to removal in a future version.Partial response will not be available in future versions to simplify the design and implementation.request()
Deprecated, for removal: This API element is subject to removal in a future version.please usechatRequest()
instead
-
Constructor Details
-
ChatModelErrorContext
public ChatModelErrorContext(Throwable error, ChatRequest chatRequest, Map<Object, Object> attributes) -
ChatModelErrorContext
@Deprecated(forRemoval=true) public ChatModelErrorContext(Throwable error, ChatModelRequest request, ChatModelResponse partialResponse, Map<Object, Object> attributes) Deprecated, for removal: This API element is subject to removal in a future version.please useChatModelErrorContext(Throwable, ChatRequest, Map)
instead
-
-
Method Details
-
error
- Returns:
- The error that occurred.
-
chatRequest
-
request
Deprecated, for removal: This API element is subject to removal in a future version.please usechatRequest()
instead -
partialResponse
Deprecated, for removal: This API element is subject to removal in a future version.Partial response will not be available in future versions to simplify the design and implementation. Please reach out if you have any concerns. -
attributes
- Returns:
- The attributes map. It can be used to pass data between methods of a
ChatModelListener
or between multipleChatModelListener
s.
-
ChatModelErrorContext(Throwable, ChatRequest, Map)
instead