Interface SKContext

    • Method Detail

      • 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 context's 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" key
        content - 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 set
        content - 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