Interface SKContext
-
- All Known Implementing Classes:
AbstractSKContext
public interface SKContextSemantic Kernel context.
-
-
Nested Class Summary
Nested Classes Modifier and Type Interface Description static interfaceSKContext.Builderstatic interfaceSKContext.BuilderSupplier
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description SKContextappendToVariable(String key, String content)Appends data to the given keySKContextbuild(ContextVariables variables, SemanticTextMemory memory, ReadOnlySkillCollection skills)SKContextcopy()Clones the contextStringgetResult()Obtain the result of the execution that produced this context.SemanticTextMemorygetSemanticMemory()Provides access to the contexts semantic memoryReadOnlySkillCollectiongetSkills()Provides access to the skills within this contextContextVariablesgetVariables()Return a copy of all variables within the contextSKContextsetVariable(String key, String content)Sets the given variableSKContextupdate(ContextVariables newData)Merges in the given variables.SKContextupdate(String content)Updates the input entry with the given data
-
-
-
Method Detail
-
build
SKContext build(ContextVariables variables, @Nullable SemanticTextMemory memory, @Nullable ReadOnlySkillCollection skills)
-
getResult
@Nullable String getResult()
Obtain the result of the execution that produced this context. This will be the "input" entry in the variables.- Returns:
- the "input" entry in the variables
-
getVariables
ContextVariables getVariables()
Return a copy of all variables within the context- Returns:
- a clone of the variables
-
getSemanticMemory
@Nullable SemanticTextMemory getSemanticMemory()
Provides access to the contexts semantic memory- Returns:
- the semantic memory
-
getSkills
ReadOnlySkillCollection getSkills()
Provides access to the skills within this context- Returns:
- the skills
-
setVariable
SKContext setVariable(String key, String content)
Sets the given variable- Parameters:
key- if null defaults to the "input" keycontent- value to set- Returns:
- Context for fluent calls
-
appendToVariable
SKContext appendToVariable(String key, String content)
Appends data to the given key- Parameters:
key- key to setcontent- value to set- Returns:
- Context for fluent calls
-
update
@CheckReturnValue SKContext update(String content)
Updates the input entry with the given data- Parameters:
content- value to set- Returns:
- Context for fluent calls
-
update
@CheckReturnValue SKContext update(ContextVariables newData)
Merges in the given variables. Duplicate keys provided by newData will overwrite existing entries.- Parameters:
newData- variables to merge in- Returns:
- Context for fluent calls
-
copy
SKContext copy()
Clones the context- Returns:
- a copy of this context
-
-