Class AbstractSKContext
- java.lang.Object
-
- com.microsoft.semantickernel.orchestration.AbstractSKContext
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from interface com.microsoft.semantickernel.orchestration.SKContext
SKContext.Builder, SKContext.BuilderSupplier
-
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description SKContextappendToVariable(String key, String content)Appends data to the given keySKContextcopy()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
-
getResult
@Nullable public String getResult()
Description copied from interface:SKContextObtain the result of the execution that produced this context. This will be the "input" entry in the variables.
-
getVariables
public ContextVariables getVariables()
Description copied from interface:SKContextReturn a copy of all variables within the context- Specified by:
getVariablesin interfaceSKContext- Returns:
- a clone of the variables
-
copy
@CheckReturnValue public SKContext copy()
Description copied from interface:SKContextClones the context
-
getSemanticMemory
@Nullable public SemanticTextMemory getSemanticMemory()
Description copied from interface:SKContextProvides access to the contexts semantic memory- Specified by:
getSemanticMemoryin interfaceSKContext- Returns:
- the semantic memory
-
getSkills
public ReadOnlySkillCollection getSkills()
Description copied from interface:SKContextProvides access to the skills within this context
-
setVariable
public SKContext setVariable(@NonNull String key, @NonNull String content)
Description copied from interface:SKContextSets the given variable- Specified by:
setVariablein interfaceSKContext- Parameters:
key- if null defaults to the "input" keycontent- value to set- Returns:
- Context for fluent calls
-
appendToVariable
public SKContext appendToVariable(@NonNull String key, @NonNull String content)
Description copied from interface:SKContextAppends data to the given key- Specified by:
appendToVariablein interfaceSKContext- Parameters:
key- key to setcontent- value to set- Returns:
- Context for fluent calls
-
update
public SKContext update(@NonNull String content)
Description copied from interface:SKContextUpdates the input entry with the given data
-
update
public SKContext update(@NonNull ContextVariables newData)
Description copied from interface:SKContextMerges in the given variables. Duplicate keys provided by newData will overwrite existing entries.
-
-