Class InvocationContext.Builder
- java.lang.Object
-
- com.microsoft.semantickernel.orchestration.InvocationContext.Builder
-
- All Implemented Interfaces:
SemanticKernelBuilder<InvocationContext>
- Enclosing class:
- InvocationContext
public static class InvocationContext.Builder extends Object implements SemanticKernelBuilder<InvocationContext>
Builder forInvocationContext.
-
-
Constructor Summary
Constructors Constructor Description Builder()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description InvocationContextbuild()Build the object.InvocationContext.BuilderwithContextVariableConverter(ContextVariableTypeConverter<?> converter)Add a context variable type converter to the builder.InvocationContext.BuilderwithContextVariableConverter(ContextVariableTypes contextVariableTypes)Add a context variable type converter to the builder.InvocationContext.BuilderwithKernelHooks(KernelHooks hooks)Add kernel hooks to the builder.InvocationContext.BuilderwithPromptExecutionSettings(PromptExecutionSettings promptExecutionSettings)Add prompt execution settings to the builder.InvocationContext.BuilderwithReturnMode(InvocationReturnMode invocationReturnMode)Set the return mode for the invocation.InvocationContext.BuilderwithToolCallBehavior(ToolCallBehavior toolCallBehavior)Add tool call behavior to the builder.
-
-
-
Method Detail
-
withKernelHooks
public InvocationContext.Builder withKernelHooks(@Nullable KernelHooks hooks)
Add kernel hooks to the builder.- Parameters:
hooks- the hooks to add.- Returns:
- this
InvocationContext.Builder
-
withPromptExecutionSettings
public InvocationContext.Builder withPromptExecutionSettings(@Nullable PromptExecutionSettings promptExecutionSettings)
Add prompt execution settings to the builder.- Parameters:
promptExecutionSettings- the settings to add.- Returns:
- this
InvocationContext.Builder
-
withToolCallBehavior
public InvocationContext.Builder withToolCallBehavior(@Nullable ToolCallBehavior toolCallBehavior)
Add tool call behavior to the builder.- Parameters:
toolCallBehavior- the behavior to add.- Returns:
- this
InvocationContext.Builder
-
withContextVariableConverter
public InvocationContext.Builder withContextVariableConverter(ContextVariableTypeConverter<?> converter)
Add a context variable type converter to the builder.- Parameters:
converter- the converter to add.- Returns:
- this
InvocationContext.Builder
-
withContextVariableConverter
public InvocationContext.Builder withContextVariableConverter(ContextVariableTypes contextVariableTypes)
Add a context variable type converter to the builder.- Parameters:
contextVariableTypes- the context variable types to add.- Returns:
- this
InvocationContext.Builder
-
withReturnMode
public InvocationContext.Builder withReturnMode(InvocationReturnMode invocationReturnMode)
Set the return mode for the invocation.Defaults to
InvocationReturnMode.NEW_MESSAGES_ONLY.- Parameters:
invocationReturnMode- the return mode for the invocation.- Returns:
- this
InvocationContext.Builder
-
build
public InvocationContext build()
Description copied from interface:SemanticKernelBuilderBuild the object.- Specified by:
buildin interfaceSemanticKernelBuilder<InvocationContext>- Returns:
- a constructed object.
-
-