AutoGPT
AutoGPT copied to clipboard
Add annoy option for local vector db
Background
This pull request addresses the need to provide an alternative local memory storage solution for Auto-GPT. Annoy is a fast and efficient local vector database that provides lower-latency access to embeddings compared to cloud-based solutions. By integrating Annoy as a memory backend, users can benefit from improved performance without relying on external services.
Changes
1. Added Annoy as an optional memory backend to the project.
2. Created a new AnnoyMemory class that implements the required methods for memory storage and retrieval.
3. Modified the initialization and configuration of the project to support the Annoy backend.
4. Updated the README.md file with instructions on how to install Annoy and configure it as the memory backend.
Documentation
1. In-code comments have been added to describe the purpose and functionality of the new AnnoyMemory class.
2. The README.md file has been updated with clear instructions on how to set up and use Annoy as the memory backend, including how to install Annoy and configure the necessary environment variables.
Test Plan
To test the functionality of the AnnoyMemory implementation, the following steps were performed:
1. Updated the configuration in the .env file to use the Annoy backend by setting MEMORY_BACKEND=annoy and adding the appropriate paths for ANNOY_INDEX_FILE and ANNOY_METADATA_FILE.
2. Ran the Auto-GPT application to ensure that the Annoy backend was being utilized and that it was properly loading, storing, and retrieving data.
3. Performed multiple test runs with different inputs, queries, and configurations to ensure that AnnoyMemory was functioning as expected and without errors.
4. Additionally, executed the provided unittests to verify the correctness of the AnnoyMemory implementation and its methods.
PR Quality Checklist
- [x] My pull request is atomic and focuses on a single change.
- [x] I have thoroughly tested my changes with multiple different prompts.
- [x] I have considered potential risks and mitigations for my changes.
- [x] I have documented my changes clearly and comprehensively.
- [x] I have not snuck in any "extra" small tweaks changes
@YenRaven CI is red
@nponeccop linting issues are now fixed.
This pull request has conflicts with the base branch, please resolve those so we can evaluate the pull request.
Conflicts have been resolved! 🎉 A maintainer will review the pull request shortly.
This pull request has conflicts with the base branch, please resolve those so we can evaluate the pull request.
Conflicts have been resolved! 🎉 A maintainer will review the pull request shortly.
This pull request has conflicts with the base branch, please resolve those so we can evaluate the pull request.
The latest updates on your projects. Learn more about Vercel for Git ↗︎
| Name | Status | Preview | Comments | Updated (UTC) |
|---|---|---|---|---|
| docs | ✅ Ready (Inspect) | Visit Preview | 💬 Add feedback | Apr 27, 2023 6:55pm |
Conflicts have been resolved! 🎉 A maintainer will review the pull request shortly.
This PR exceeds the recommended size of 200 lines. Please make sure you are NOT addressing multiple issues with one PR. Note this PR might be rejected due to its size
This PR exceeds the recommended size of 200 lines. Please make sure you are NOT addressing multiple issues with one PR. Note this PR might be rejected due to its size
This is a mass message from the AutoGPT core team. Our apologies for the ongoing delay in processing PRs. This is because we are re-architecting the AutoGPT core!
For more details (and for infor on joining our Discord), please refer to: https://github.com/Significant-Gravitas/Auto-GPT/wiki/Architecting
This pull request has conflicts with the base branch, please resolve those so we can evaluate the pull request.
Hey, I've marked this as don't merge until the Memory Fixes are in. Sorry to keep it on hold longer, just no real way to test/validate functionality until the fixes are in