InvocationContext Class 
	- java.lang. Object 
- com.microsoft. semantickernel. orchestration. InvocationContext 
 
- com.
public class InvocationContext
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<T>.
Constructor Summary
| Modifier | Constructor | Description | 
|---|---|---|
| protected | InvocationContext() | Create a new instance of Invocation | 
| protected | InvocationContext(KernelHooks hooks, PromptExecutionSettings promptExecutionSettings, ToolCallBehavior toolCallBehavior, ContextVariableTypes contextVariableTypes, InvocationReturnMode invocationReturnMode) | Create a new instance of Invocation | 
| protected | InvocationContext(InvocationContext context) | Create a new instance of Invocation | 
Method Summary
| Modifier and Type | Method and Description | 
|---|---|
| static Builder | builder() Create a new Builder for building an instance of  | 
| static Builder | copy(InvocationContext context) Create a new instance of Invocation | 
| Context | getContextVariableTypes() Get the types of context variables. | 
| Unmodifiable | getKernelHooks() Get the hooks to use for the invocation. | 
| Prompt | getPromptExecutionSettings() Get the settings for prompt execution. | 
| Tool | getToolCallBehavior() Get the behavior for tool calls. | 
| Invocation | returnMode() Get the return mode for the invocation. | 
Methods inherited from java.lang.Object
Constructor Details
InvocationContext
protected InvocationContext()
Create a new instance of InvocationContext.
InvocationContext
protected InvocationContext(KernelHooks hooks, PromptExecutionSettings promptExecutionSettings, ToolCallBehavior toolCallBehavior, ContextVariableTypes contextVariableTypes, InvocationReturnMode invocationReturnMode)
Create a new instance of InvocationContext.
Parameters:
InvocationContext
protected InvocationContext(InvocationContext context)
Create a new instance of InvocationContext.
Parameters:
Method Details
builder
public static InvocationContext.Builder builder()
Create a new Builder for building an instance of InvocationContext.
Returns:
copy
public static InvocationContext.Builder copy(InvocationContext context)
Create a new instance of InvocationContext by copying the values from another instance.
Parameters:
Returns:
getContextVariableTypes
public ContextVariableTypes getContextVariableTypes()
Get the types of context variables.
Returns:
getKernelHooks
public KernelHooks.UnmodifiableKernelHooks getKernelHooks()
Get the hooks to use for the invocation.
Returns:
getPromptExecutionSettings
public PromptExecutionSettings getPromptExecutionSettings()
Get the settings for prompt execution.
Returns:
getToolCallBehavior
public ToolCallBehavior getToolCallBehavior()
Get the behavior for tool calls.
Returns:
returnMode
public InvocationReturnMode returnMode()
Get the return mode for the invocation.
Returns: