InvocationContext.Builder Class
- java.
lang. Object - com.
microsoft. semantickernel. orchestration. InvocationContext. Builder
- com.
Implements
public static class InvocationContext.Builder
implements SemanticKernelBuilder<InvocationContext>
Builder for InvocationContext.
Constructor Summary
Constructor | Description | |
---|---|---|
Builder() |
Method Summary
Modifier and Type | Method and Description |
---|---|
Invocation |
build()
Build the object. |
Builder |
withContextVariableConverter(ContextVariableTypeConverter<?> converter)
Add a context variable type converter to the builder. |
Builder |
withContextVariableConverter(ContextVariableTypes contextVariableTypes)
Add a context variable type converter to the builder. |
Builder |
withKernelHooks(KernelHooks hooks)
Add kernel hooks to the builder. |
Builder |
withPromptExecutionSettings(PromptExecutionSettings promptExecutionSettings)
Add prompt execution settings to the builder. |
Builder |
withReturnMode(InvocationReturnMode invocationReturnMode)
Set the return mode for the invocation. |
Builder |
withToolCallBehavior(ToolCallBehavior toolCallBehavior)
Add tool call behavior to the builder. |
Methods inherited from java.lang.Object
Constructor Details
Builder
public Builder()
Method Details
build
public InvocationContext build()
Build the object.
withContextVariableConverter
public InvocationContext.Builder withContextVariableConverter(ContextVariableTypeConverter converter)
Add a context variable type converter to the builder.
Parameters:
Returns:
withContextVariableConverter
public InvocationContext.Builder withContextVariableConverter(ContextVariableTypes contextVariableTypes)
Add a context variable type converter to the builder.
Parameters:
Returns:
withKernelHooks
public InvocationContext.Builder withKernelHooks(KernelHooks hooks)
Add kernel hooks to the builder.
Parameters:
Returns:
withPromptExecutionSettings
public InvocationContext.Builder withPromptExecutionSettings(PromptExecutionSettings promptExecutionSettings)
Add prompt execution settings to the builder.
Parameters:
Returns:
withReturnMode
public InvocationContext.Builder withReturnMode(InvocationReturnMode invocationReturnMode)
Set the return mode for the invocation.
Defaults to NEW_MESSAGES_ONLY.
Parameters:
Returns:
withToolCallBehavior
public InvocationContext.Builder withToolCallBehavior(ToolCallBehavior toolCallBehavior)
Add tool call behavior to the builder.
Parameters:
Returns: