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
-
-
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 contextStringgetLastErrorDescription()ExceptiongetLastException()StringgetResult()Obtain the result of the execution that produced this context.SemanticTextMemorygetSemanticMemory()Provides access to the context's semantic memoryReadOnlySkillCollectiongetSkills()Provides access to the skills within this contextContextVariablesgetVariables()Return a copy of all variables within the contextbooleanisErrorOccurred()SKContextsetVariable(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 context's 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.
-
isErrorOccurred
public boolean isErrorOccurred()
-
getLastErrorDescription
public String getLastErrorDescription()
-
-