molecules
¶
Molecules represent self-contained conceptual units that combine atoms to create more complex but focused components. They focus on "what something is" rather than "what it does."
See Design Principles - Molecules for more details.
Link
¶
Bases: Memory
A memory that can have a parent and children Links, forming a hierarchical structure of interconnected memories.
The content can be either a [Notion][silverlingua.core.molecules.notion.Notion] or a [Memory][silverlingua.core.atoms.memory.Memory].
(You can still use the content as a string via str(link.content).)
Notion
¶
Bases: Memory
A memory that stores the role associated with its content.
The role is usually a [ChatRole][silverlingua.core.atoms.role.chat.ChatRole] or a [ReactRole][silverlingua.core.atoms.role.react.ReactRole].
(See [atoms/roles][silverlingua.core.atoms.role])
Attributes:
| Name | Type | Description |
|---|---|---|
role |
str
|
The role of the notion. |
content |
str
|
The content of the memory. |
persistent |
bool
|
Whether the notion should be stored in long-term memory. |
Source code in src/SilverLingua/core/molecules/notion.py
chat_role
property
¶
chat_role: ChatRole
Gets the chat based role Enum (e.g. Role.SYSTEM, Role.HUMAN, etc.)
(See config)
react_role
property
¶
react_role: ReactRole
Gets the react based role Enum (e.g. Role.THOUGHT, Role.OBSERVATION, etc.)
(See config)