Class DefaultInvocationContext

java.lang.Object
dev.langchain4j.invocation.DefaultInvocationContext
All Implemented Interfaces:
InvocationContext

public class DefaultInvocationContext extends Object implements InvocationContext
The InvocationContext built by LangChain4j.

Besides its values, it holds whether the invocation has already reported its end (see InvocationEnd). Copies made with InvocationContext.toBuilder() that keep the same invocationId() share this state, so the invocation reports its end only once, whichever copy is used. A copy with another invocation id, or a context built from scratch, starts as not ended.

Since:
1.6.0