Interface WritableContextVariables
-
- All Superinterfaces:
Buildable,ContextVariables
public interface WritableContextVariables extends ContextVariables
Context Variables is a data structure that holds temporary data while a task is being performed. It is accessed by functions in the pipeline.
-
-
Nested Class Summary
Nested Classes Modifier and Type Interface Description static interfaceWritableContextVariables.Builder
-
Field Summary
-
Fields inherited from interface com.microsoft.semantickernel.orchestration.ContextVariables
MAIN_KEY
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description ContextVariablesappendToVariable(String key, String content)ContextVariablesremove(String key)ContextVariablessetVariable(String key, String content)Set the valueContextVariablesupdate(ContextVariables newData, boolean merge)Updates the variables merging or overwriting in the new values.ContextVariablesupdate(String content)Updates the main input text with the new value after a function is complete.-
Methods inherited from interface com.microsoft.semantickernel.orchestration.ContextVariables
asMap, get, getInput, prettyPrint, writableClone
-
-
-
-
Method Detail
-
setVariable
ContextVariables setVariable(String key, String content)
Set the value- Parameters:
key- variable namecontent- value to set- Returns:
- Context for fluent calls
-
appendToVariable
ContextVariables appendToVariable(String key, String content)
-
update
ContextVariables update(String content)
Updates the main input text with the new value after a function is complete.- Parameters:
content- The new input value, for the next function in the pipeline, or as a result for the user if the pipeline reached the end.- Returns:
- The current instance
-
update
ContextVariables update(ContextVariables newData, boolean merge)
Updates the variables merging or overwriting in the new values.- Parameters:
newData- Data to merge or overwrite.merge- Whether to merge the new data with the existing data or to replace it- Returns:
- The current instance
-
remove
ContextVariables remove(String key)
-
-