ApiMem()

This class, implemented as part of the SILVIA C# API, provides access to memory functions that can dynamically remember, forget, or delete blocks of SILVIA knowledge. This also includes file manipulation, since loading, merging, and saving files are operations that can change SILVIA memory as well.

While you can define a “public SilviaCore” reference in external C# scripts by whatever name you choose, for all internal scripting, the Silvia Core is referred to as “_core”, e.g. “_core.ApiMem()…”

Discussion

A SILVIA Core can Merge entire Brain Files into its current memory, which will populate the current brain with additional Concepts, Behaviors, and Scripts. A SILVIA Brain File could be set up to manage the loading and unloading of other Brain Files for specific knowledgebase access. The ApiMem() functions also provide for live enabling and disabling of specific Behavior Groups to intelligently avail or limit the active Brain File content without deleting it.

ApiMem()

This class, implemented as part of the SILVIA C# API, provides access to memory functions that can dynamically remember, forget, or delete blocks of SILVIA knowledge.

Function
Description
ApiMem().Load
Loads or merges one or more SILVIA Brain Files into memory.
ApiMem().Save
Saves a SILVIA Brain File, including Concepts, Concept Bindings, Behaviors, and all internal Scripts.
ApiMem().MergeText
Merges plain-text expert data into the SILVIA Brain.
ApiMem().MergeAIML
(Deprecated in 2.0.1) Merges AIML (AI Markup Language) data into the SILVIA Brain.
ApiMem().GetAllGroups
Returns a string containing all of the Behavior Groups in memory, separated by the “|” character (Pipe-separated).
ApiMem().GetActiveGroups
Returns a string containing only the Behavior Groups in memory that are currently active, separated by the “|” character (Pipe-separated).
ApiMem().GroupEnable
Enables one or more Behavior Groups in memory.
ApiMem().GroupEnableOnly
Exclusively enables one or more Behavior Groups in memory.
ApiMem().GroupDisable
Disables one or more Behavior Groups in memory.
ApiMem().GroupIsEnabled
Returns the enabled/disabled state of a Behavior Group in memory.
ApiMem().GroupDelete
Deletes one or more Behavior Groups from memory.
ApiMem().GroupDeleteExcept
Deletes any Behavior Groups not specified from memory.