mirror of
https://github.com/OpenHands/OpenHands.git
synced 2025-12-25 21:36:52 +08:00
* docs(docs): start implementing docs website * update video url * add autogenerated codebase docs for backend * precommit * update links * fix config and video * gh actions * rename * workdirs * path * path * fix doc1 * redo markdown * docs * change main folder name * simplify readme * add back architecture * Fix lint errors * lint * update poetry lock --------- Co-authored-by: Jim Su <jimsu@protonmail.com>
925 B
925 B
sidebar_label, title
| sidebar_label | title |
|---|---|
| memory | agenthub.monologue_agent.utils.memory |
LongTermMemory Objects
class LongTermMemory()
Responsible for storing information that the agent can call on later for better insights and context. Uses chromadb to store and search through memories.
__init__
def __init__()
Initialize the chromadb and set up ChromaVectorStore for later use.
add_event
def add_event(event: dict)
Adds a new event to the long term memory with a unique id.
Arguments:
- event (dict): The new event to be added to memory
search
def search(query: str, k: int = 10)
Searches through the current memory using VectorIndexRetriever
Arguments:
- query (str): A query to match search results to
- k (int): Number of top results to return
Returns:
- List[str]: List of top k results found in current memory