agent-squad
agent-squad copied to clipboard
Add Chroma Retrieval #323
Issue Link (REQUIRED)
https://github.com/awslabs/agent-squad/issues/323 Fixes #323
Summary
Changes
- Added Python implementation of Chroma Retriever
- Created
ChromaRetrieverclass andChromaRetrieverOptionsclass - Implemented all necessary retrieval methods
- Added unit tests
- Updated dependencies and exports
- Created
- Added TypeScript implementation of Chroma Retriever
- Created
ChromaRetrieverclass andChromaRetrieverOptionsinterface - Implemented all necessary retrieval methods
- Added unit tests
- Updated dependencies and exports
- Configured testing environment
- Created
User experience
Before:
- Users could not use ChromaDB as a retriever
- Manual implementation of ChromaDB integration was required
After:
- Users can directly use Chroma Retriever
- Support for both local and remote ChromaDB instances
- Support for custom embedding functions
- Support for persistent storage
- Support for SSL connections
- Support for custom result count
- Support for metadata retrieval
Usage examples:
Python:
from agent_squad.retrievers import ChromaRetriever, ChromaRetrieverOptions
# Create retriever
options = ChromaRetrieverOptions(
collection_name="my_collection",
persist_directory="./data"
)
retriever = ChromaRetriever(options)
# Retrieve documents
results = await retriever.retrieve("query text")
combined_results = await retriever.retrieve_and_combine_results("query text")
TypeScript:
import { ChromaRetriever, ChromaRetrieverOptions } from 'agent-squad';
// Create retriever
const options: ChromaRetrieverOptions = {
collectionName: "my_collection",
persistDirectory: "./data"
};
const retriever = new ChromaRetriever(options);
// Retrieve documents
const results = await retriever.retrieve("query text");
const combinedResults = await retriever.retrieveAndCombineResults("query text");
Checklist
- [x] I have performed a self-review of this change
- [x] Changes have been tested
- [x] Changes are documented
- [x] I have linked this PR to an existing issue (required)
Is this a breaking change?
RFC issue number: N/A
Checklist:
- [x] Migration process documented
- [x] Implement warnings (if it can live side by side)
Acknowledgment
By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.
Disclaimer: We value your time and bandwidth. As such, any pull requests created on non-triaged issues might not be successful.
Hey @ailunc ! Are you still working on this? If not, I can take over and compete this PR
Occupied by other code :) Feel free to take over!