Class AbstractSKContext

  • All Implemented Interfaces:
    SKContext

    public abstract class AbstractSKContext
    extends Object
    implements SKContext
    Semantic Kernel context
    • Method Detail

      • getResult

        @Nullable
        public String getResult()
        Description copied from interface: SKContext
        Obtain the result of the execution that produced this context. This will be the "input" entry in the variables.
        Specified by:
        getResult in interface SKContext
        Returns:
        the "input" entry in the variables
      • getVariables

        public ContextVariables getVariables()
        Description copied from interface: SKContext
        Return a copy of all variables within the context
        Specified by:
        getVariables in interface SKContext
        Returns:
        a clone of the variables
      • setVariable

        public SKContext setVariable​(@NonNull
                                     String key,
                                     @NonNull
                                     String content)
        Description copied from interface: SKContext
        Sets the given variable
        Specified by:
        setVariable in interface SKContext
        Parameters:
        key - if null defaults to the "input" key
        content - value to set
        Returns:
        Context for fluent calls
      • appendToVariable

        public SKContext appendToVariable​(@NonNull
                                          String key,
                                          @NonNull
                                          String content)
        Description copied from interface: SKContext
        Appends data to the given key
        Specified by:
        appendToVariable in interface SKContext
        Parameters:
        key - key to set
        content - value to set
        Returns:
        Context for fluent calls
      • update

        public SKContext update​(@NonNull
                                String content)
        Description copied from interface: SKContext
        Updates the input entry with the given data
        Specified by:
        update in interface SKContext
        Parameters:
        content - value to set
        Returns:
        Context for fluent calls
      • update

        public SKContext update​(@NonNull
                                ContextVariables newData)
        Description copied from interface: SKContext
        Merges in the given variables. Duplicate keys provided by newData will overwrite existing entries.
        Specified by:
        update in interface SKContext
        Parameters:
        newData - variables to merge in
        Returns:
        Context for fluent calls