Interface InvocationContext
- All Known Implementing Classes:
DefaultInvocationContext
public interface InvocationContext
Represents the context of a single AI Service invocation.
A new instance is created each time an AI Service method is invoked,
and it exists until the end of the AI Service invocation,
potentially spanning multiple calls to the
ChatModel
.- Since:
- 1.6.0
-
Nested Class Summary
Nested ClassesModifier and TypeInterfaceDescriptionstatic class
A builder class to createInvocationContext
instances. -
Method Summary
Modifier and TypeMethodDescriptionstatic InvocationContext.Builder
builder()
Creates a new instance of theBuilder
class for constructing instances ofDefaultInvocationContext
.The chat memory id parameter of the methodThe fully-qualified name of the AI Service interface where the invocation was initiated fromUnique identifier for an entire AI Service invocationThe invocation parametersThe arguments passed into the AI Service methodThe method name oninterfaceName()
where the invocation was initiated fromRetrieves the point in time when the invocation occurred.default InvocationContext.Builder
Converts the current instance ofDefaultInvocationContext
into aInvocationContext.Builder
, pre-populated with the current values of the instance.
-
Method Details
-
invocationId
UUID invocationId()Unique identifier for an entire AI Service invocation -
interfaceName
String interfaceName()The fully-qualified name of the AI Service interface where the invocation was initiated from- See Also:
-
methodName
String methodName()The method name oninterfaceName()
where the invocation was initiated from -
methodArguments
-
chatMemoryId
Object chatMemoryId()The chat memory id parameter of the method -
invocationParameters
InvocationParameters invocationParameters()The invocation parameters -
timestamp
Instant timestamp()Retrieves the point in time when the invocation occurred. -
toBuilder
Converts the current instance ofDefaultInvocationContext
into aInvocationContext.Builder
, pre-populated with the current values of the instance. -
builder
Creates a new instance of theBuilder
class for constructing instances ofDefaultInvocationContext
.
-