A Python client for interacting with SenTech AI's memory fields API.
Project description
Memory Fields
Memory Fields is a Python client for interacting with the SenTech AI Memory API, enabling users to add, query, and manage memory fields efficiently.
Installation
You can install the package using pip:
pip install memory-fields
Usage
Import and Initialize the Client**
from memoryfields import EMFClient
# Replace 'your_api_key' with a valid API key
client = EMFClient(api_key="your_api_key")
Add Memory to a Field**
response = client.add_memory(
field_id="12345",
content="This is a test memory.",
timestamp=1700000000
)
print(response)
Query Memories**
results = client.query_memory(field_id="12345", query="What do I remember?")
print(results)
Query with an Image**
image_results = client.query_image(field_id="12345", image_path="sample.jpg")
print(image_results)
API Methods
| Method | Description |
|---|---|
add_memory(field_id, content, timestamp, relevance=1.0, decay_rate=0.01, salience=1.0) |
Adds a memory to a specified field. |
query_memory(field_id, query, top_k=50, depth_k=3) |
Searches a field for relevant memories based on a text query. |
query_image(field_id, query=None, image_path=None, top_k=50) |
Performs a combined query using text and an optional image. |
License
This project is licensed under the MIT License - see the LICENSE file for details.
Contributing
Contributions are welcome! Please open an issue or submit a pull request.
Contact
For support or inquiries, reach out via GitHub Issues. or email us at service@sentech.ai
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
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 memoryfields-0.1.1.tar.gz.
File metadata
- Download URL: memoryfields-0.1.1.tar.gz
- Upload date:
- Size: 3.2 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.11.0rc2
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
98895723909a24e81278710d6bc40f11baaef95f6799778366d7ad1efe90b767
|
|
| MD5 |
47c65f3ccf2d16a5cb66d6d50a978974
|
|
| BLAKE2b-256 |
92f0546e3e9933cd637790d779d5bc53e65bc2ba67c51b3eea4d6a9bf2b8f1ab
|
File details
Details for the file memoryfields-0.1.1-py3-none-any.whl.
File metadata
- Download URL: memoryfields-0.1.1-py3-none-any.whl
- Upload date:
- Size: 3.6 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.11.0rc2
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
227de83d168ea7eceee16d7a5f2ec563fcde3a9efc4e50cb22d9bcae0768a303
|
|
| MD5 |
069fe17e73756a4ee511bd886dd2111e
|
|
| BLAKE2b-256 |
170bd46a35df547e87a81a32487ff2791d862998b53e9f681b0a4a306e7ea0b1
|