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
  • 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 on interfaceName() where the invocation was initiated from
    • methodArguments

      List<Object> methodArguments()
      The arguments passed into the AI Service method
    • 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

      default InvocationContext.Builder toBuilder()
      Converts the current instance of DefaultInvocationContext into a InvocationContext.Builder, pre-populated with the current values of the instance.
    • builder

      static InvocationContext.Builder builder()
      Creates a new instance of the Builder class for constructing instances of DefaultInvocationContext.