ContextVariableTypeConverter.Builder<T> Class
- java.
lang. Object - com.
microsoft. semantickernel. contextvariables. ContextVariableTypeConverter. Builder<T>
- com.
Type Parameters
- T
the type of the context variable
public static class ContextVariableTypeConverter.Builder<T>
A builder for a context variable type converter.
Constructor Summary
| Constructor | Description |
|---|---|
| Builder(Class<T> clazz) |
Create a new builder for a context variable type converter. |
Method Summary
| Modifier and Type | Method and Description |
|---|---|
|
Context |
build()
Build the context variable type converter. |
| Builder<T> |
fromObject(Function<Object,T> fromObject)
Set the function to convert an object to the type. |
| Builder<T> |
fromPromptString(Function<String,T> fromPromptString)
Set the function to convert a prompt string to the type. |
| Builder<T> |
proxyGlobalType()
Make this builder a proxy for another type converter. |
| Builder<T> |
proxyType(ContextVariableTypeConverter<T> proxy)
Make this builder a proxy for another type converter. |
| Builder<T> |
toPromptString(Function<T,String> toPromptString)
Set the function to convert the type to a prompt string. |
Methods inherited from java.lang.Object
Constructor Details
Builder
public Builder(Class
Create a new builder for a context variable type converter.
Parameters:
Method Details
build
public ContextVariableTypeConverter
Build the context variable type converter.
Returns:
fromObject
public ContextVariableTypeConverter.Builder
Set the function to convert an object to the type.
Parameters:
Returns:
fromPromptString
public ContextVariableTypeConverter.Builder
Set the function to convert a prompt string to the type.
Parameters:
Returns:
proxyGlobalType
public ContextVariableTypeConverter.Builder
Make this builder a proxy for another type converter.
Returns:
proxyType
public ContextVariableTypeConverter.Builder
Make this builder a proxy for another type converter.
Parameters:
Returns:
toPromptString
public ContextVariableTypeConverter.Builder
Set the function to convert the type to a prompt string.
Parameters:
Returns: