Class InvocationContext


  • public class InvocationContext
    extends Object
    Context passed to a Kernel or KernelFunction invoke. This class is primarily for internal use. The preferred way to supply a context is to use the discrete "with" methods in FunctionInvocation.
    • Method Detail

      • copy

        public static InvocationContext.Builder copy​(InvocationContext context)
        Create a new instance of InvocationContext by copying the values from another instance.
        Parameters:
        context - The context to copy.
        Returns:
        The new instance of InvocationContext.
      • getPromptExecutionSettings

        @Nullable
        public PromptExecutionSettings getPromptExecutionSettings()
        Get the settings for prompt execution.
        Returns:
        The settings for prompt execution.
      • getToolCallBehavior

        @Nullable
        public ToolCallBehavior getToolCallBehavior()
        Get the behavior for tool calls.
        Returns:
        The behavior for tool calls.
      • getContextVariableTypes

        public ContextVariableTypes getContextVariableTypes()
        Get the types of context variables.
        Returns:
        The types of context variables.
      • getTelemetry

        public com.microsoft.semantickernel.implementation.telemetry.SemanticKernelTelemetry getTelemetry()