Class DecisionModelErrorContext
java.lang.Object
dev.langchain4j.model.decision.listener.DecisionModelErrorContext
The context of an error of a decision model: the error, the corresponding request, the model provider and
attributes.
The attributes can be used to pass data between the methods of a
DecisionModelListener, or between
multiple listeners.- Since:
- 1.21.0
-
Nested Class Summary
Nested Classes -
Constructor Summary
ConstructorsConstructorDescriptionDecisionModelErrorContext(Throwable error, DecisionRequest decisionRequest, ModelProvider modelProvider, Map<Object, Object> attributes) Deprecated. -
Method Summary
-
Constructor Details
-
DecisionModelErrorContext
@Deprecated(since="1.24.0") public DecisionModelErrorContext(Throwable error, DecisionRequest decisionRequest, ModelProvider modelProvider, Map<Object, Object> attributes) Deprecated.usebuilder()instead
-
-
Method Details
-
error
-
decisionRequest
-
modelProvider
-
attributes
-
invocationId
- Returns:
- the id of the AI Service invocation in which this call is made (the calls made by its tools, guardrails,
retrieval, moderation, chat memory, ...), otherwise
null, for example when it is called outside of an AI Service. It is theInvocationContext.invocationId()of the AI Service invocation, not an id of this call. - Since:
- 1.24.0
-
builder
- Since:
- 1.24.0
-
builder()instead