Class ChatModelErrorContext
-
- All Implemented Interfaces:
public class ChatModelErrorContextThe error context. It contains the error, corresponding ChatModelRequest, partial ChatModelResponse (if available) and attributes. The attributes can be used to pass data between methods of a ChatModelListener or between multiple ChatModelListeners.
-
-
Constructor Summary
Constructors Constructor Description ChatModelErrorContext(Throwable error, ChatModelRequest request, ChatModelResponse partialResponse, Map<Object, Object> attributes)
-
Method Summary
Modifier and Type Method Description Throwableerror()ChatModelRequestrequest()ChatModelResponsepartialResponse()Map<Object, Object>attributes()-
-
Constructor Detail
-
ChatModelErrorContext
ChatModelErrorContext(Throwable error, ChatModelRequest request, ChatModelResponse partialResponse, Map<Object, Object> attributes)
-
-
Method Detail
-
request
ChatModelRequest request()
- Returns:
The request to the ChatLanguageModel the error corresponds to.
-
partialResponse
ChatModelResponse partialResponse()
- Returns:
The partial response from the ChatLanguageModel, if available. When used with StreamingChatLanguageModel, it might contain the tokens that were received before the error occurred.
-
attributes
Map<Object, Object> attributes()
- Returns:
The attributes map. It can be used to pass data between methods of a ChatModelListener or between multiple ChatModelListeners.
-
-
-
-