Class DecisionModelResponseContext
java.lang.Object
dev.langchain4j.model.decision.listener.DecisionModelResponseContext
The context of a response from a decision model: the response, 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
ConstructorsConstructorDescriptionDecisionModelResponseContext(DecisionResponse decisionResponse, DecisionRequest decisionRequest, ModelProvider modelProvider, Map<Object, Object> attributes) Deprecated. -
Method Summary
-
Constructor Details
-
DecisionModelResponseContext
@Deprecated(since="1.24.0") public DecisionModelResponseContext(DecisionResponse decisionResponse, DecisionRequest decisionRequest, ModelProvider modelProvider, Map<Object, Object> attributes) Deprecated.usebuilder()instead
-
-
Method Details
-
decisionResponse
-
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