Class ContextVariableTypeConverter.Builder<T>
- java.lang.Object
-
- com.microsoft.semantickernel.contextvariables.ContextVariableTypeConverter.Builder<T>
-
- Enclosing class:
- ContextVariableTypeConverter<T>
public static class ContextVariableTypeConverter.Builder<T> extends Object
A builder for a context variable type converter.
-
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description ContextVariableTypeConverter<T>build()Build the context variable type converter.ContextVariableTypeConverter.Builder<T>fromObject(Function<Object,T> fromObject)Set the function to convert an object to the type.ContextVariableTypeConverter.Builder<T>fromPromptString(Function<String,T> fromPromptString)Set the function to convert a prompt string to the type.ContextVariableTypeConverter.Builder<T>proxyGlobalType()Make this builder a proxy for another type converter.ContextVariableTypeConverter.Builder<T>proxyType(ContextVariableTypeConverter<T> proxy)Make this builder a proxy for another type converter.ContextVariableTypeConverter.Builder<T>toPromptString(Function<T,String> toPromptString)Set the function to convert the type to a prompt string.
-
-
-
Method Detail
-
proxyGlobalType
public ContextVariableTypeConverter.Builder<T> proxyGlobalType()
Make this builder a proxy for another type converter.- Returns:
- this builder
-
proxyType
public ContextVariableTypeConverter.Builder<T> proxyType(ContextVariableTypeConverter<T> proxy)
Make this builder a proxy for another type converter.- Parameters:
proxy- the proxy type converter- Returns:
- this builder
-
fromObject
public ContextVariableTypeConverter.Builder<T> fromObject(Function<Object,T> fromObject)
Set the function to convert an object to the type.- Parameters:
fromObject- the function to convert an object to the type- Returns:
- this builder
-
toPromptString
public ContextVariableTypeConverter.Builder<T> toPromptString(Function<T,String> toPromptString)
Set the function to convert the type to a prompt string.- Parameters:
toPromptString- the function to convert the type to a prompt string- Returns:
- this builder
-
fromPromptString
public ContextVariableTypeConverter.Builder<T> fromPromptString(Function<String,T> fromPromptString)
Set the function to convert a prompt string to the type.- Parameters:
fromPromptString- the function to convert a prompt string to the type- Returns:
- this builder
-
build
public ContextVariableTypeConverter<T> build()
Build the context variable type converter.- Returns:
- the context variable type converter
-
-