AutoGPT
AutoGPT copied to clipboard
Add Qdrant as a long memory backend.
Hi there! For this pull request, I have read your announcement carefully.
Background
As I notice there are many vector databases provided in chatgpt-retrieve-plugin. I think all the vector databases can be used by you as a long-term memory. So this is the first commit to add the most easier used one 'Qdrant'. And I am willing to implement them all!
Changes
This commit only "Add Qdrant as a long memory backend." what I do is:
- Implement QdrantMemory based on MemoryProviderSingleton
- add 'qdrant' option in "memory/init.py"
- add 'qdrant-client' in requirements.txt
- add unit test and integration test in 'qdrant_memory_test.py' and 'qdrant_memory_tests.py'
Documentation
The implement is very clear in-code comments. I just implement all your API and test all them to work.
- def add(self, data)
- def get(self, data)
- def clear(self)
- def get_relevant(self, data, num_relevant=5)
- def get_stats(self)
Test Plan
- Unit test in 'qdrant_memory_test.py'
- IntegrationTest in 'qdrant_memory_tests.py'
- Test step: Lauch a Qdrant docker instance
docker run -p "6333:6333" -p "6334:6334" qdrant/qdrant:v1.0.3and then just run all the related cases. - I've also tested with the following instructions:
Enter up to 5 goals for your AI: For example: Increase net worth, Grow Twitter Account, Develop and manage multiple businesses autonomously'
Enter nothing to load defaults, enter nothing when finished.
Goal 1: Visit a website which provides today's news.
Goal 2: Summarize the articles and write the results to text files
Goal 3: Terminate
Goal 4:
Using memory of type: QdrantMemory
SUMMARIZE TODAY'S LEADING NEWS THOUGHTS: I need to determine which news website to visit and then summarize
...
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
@wangxuqi There are conflicts now
@wangxuqi There are conflicts now
The conflict is caused by another long memory 'Milvus' merged. I have resolved the conflict.
@nponeccop As I solve the conflict , I find the merged 'Milvus memory' code is very poor. With no tests and even not worked. Also the package import is wrong and the milvs.py is not under the correct directory. Please review the pull request again https://github.com/Significant-Gravitas/Auto-GPT/pull/801 or I will fixed it later.
Fix conflict with another merged PR 1658. As I see you have add a potential plugin label. I think it maybe a better way to fit all chatgpt-retrieve-plugin. vector databases. Try to do this later.
Ops! Conflict with README.md again. resolve it. Hope this time no more conflicts.
CI broken fixed by https://github.com/Significant-Gravitas/Auto-GPT/pull/2061
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.
Codecov Report
Patch coverage: 14.06% and project coverage change: -0.46 :warning:
Comparison is base (
8e8a5a1) 36.22% compared to head (0457470) 35.77%.
Additional details and impacted files
@@ Coverage Diff @@
## master #1515 +/- ##
==========================================
- Coverage 36.22% 35.77% -0.46%
==========================================
Files 60 61 +1
Lines 2849 2913 +64
Branches 471 477 +6
==========================================
+ Hits 1032 1042 +10
- Misses 1755 1808 +53
- Partials 62 63 +1
| Impacted Files | Coverage Ξ | |
|---|---|---|
| autogpt/memory/qdrant.py | 4.00% <4.00%> (ΓΈ) |
|
| autogpt/memory/__init__.py | 43.07% <41.66%> (-0.32%) |
:arrow_down: |
| autogpt/config/config.py | 75.00% <100.00%> (+0.35%) |
:arrow_up: |
... and 1 file with indirect coverage changes
Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.
:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Do you have feedback about the report comment? Let us know in this issue.
This pull request has conflicts with the base branch, please resolve those so we can evaluate the pull request.
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
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
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
As I see the discussion https://github.com/Significant-Gravitas/Auto-GPT/discussions/4280. So close the pr for now. Thanks for your attention and reply. Wish you all good.