The framework for agent memory
Project description
simplememory
This will be the memory of the agents
To use this package:
Ensure that .env exists with below.
OPENAI_API_KEY=sk-"ADD YOUR API KEY HERE"
PINECONE_API_KEY = "ADD YOUR API KEY HERE"
PINECONE_INDEX="ADD YOUR INDEX NAME HERE"
How to add to semantic memory:
from memory.semantic_memory import SemanticMemory
if __name__=="__main__":
sc= SemanticMemory()
semantic_val,memory_item = sc.add_memory_item(mem_key="What is the capital of india?",mem_val="The capital of India is New Delhi"
print(semantic_val)
print(memory_item)
How to retrieve semantic memory:
from memory.semantic_memory import SemanticMemory
if __name__=="__main__":
sc= SemanticMemory()
result = sc.retrieve_memory_item(mem_key="what is the capital of India?")
print(result['matches'][0]['metadata']['key'])
print(result['matches'][0]['metadata']['value'])
print(result['matches'][0]['score'])
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
simplememory-0.0.1.tar.gz
(3.2 kB
view details)
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file simplememory-0.0.1.tar.gz.
File metadata
- Download URL: simplememory-0.0.1.tar.gz
- Upload date:
- Size: 3.2 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.1.0 CPython/3.11.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
3c174b6cc518969e0f45e7b704c66d42bc4279ee21fd68a4e77b21465a5024aa
|
|
| MD5 |
cdebf6b770fd59655190216aa9b8375c
|
|
| BLAKE2b-256 |
093625298b48ceb1175f06c13a775130187eb03f760a535a1446396e18ce7ac2
|
File details
Details for the file simplememory-0.0.1-py3-none-any.whl.
File metadata
- Download URL: simplememory-0.0.1-py3-none-any.whl
- Upload date:
- Size: 3.7 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.1.0 CPython/3.11.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
912110a71e84432f2a4d28c351d4bdcf1a86348bdb0775d07612ab834cc07b18
|
|
| MD5 |
1f0553e6f910f2dcfd03ccbad9baa9df
|
|
| BLAKE2b-256 |
43ec5c51aea0d5672922fea69f28308bce9f593cbc5cea492f9d06afc2e07bd4
|