<⚡️> SuperAGI - A dev-first open source autonomous AI agent framework. Enabling developers to build, manage & run useful autonomous agents quickly and reliably.
This PR updates the __get_embeddings method to handle both a list of strings and a single string input. Previously, the method only supported a list of strings. With this update, the method checks the type of the texts parameter and processes it accordingly.
Added a type check for the texts parameter to differentiate between a list of strings and a single string.
If texts is a list, the method processes each string individually and returns the list of query vectors.
If texts is a single string, the method processes it and returns a single-element list containing the query vector.
Related Issues
Method __get_embeddings in qdrant DB.
Solution and Design
Test Plan
Type of change
[ ] Bug fix (non-breaking change which fixes an issue)
[ ] New feature (non-breaking change which adds functionality)
[x] Breaking change (fix or feature that would cause existing functionality to change)
[ ] Docs update
Checklist
[x] My pull request is atomic and focuses on a single change.
[x] I have read the contributing guide and my code conforms to the guidelines.
[x] I have documented my changes clearly and comprehensively.
Description
This PR updates the __get_embeddings method to handle both a list of strings and a single string input. Previously, the method only supported a list of strings. With this update, the method checks the type of the texts parameter and processes it accordingly.
Added a type check for the texts parameter to differentiate between a list of strings and a single string. If texts is a list, the method processes each string individually and returns the list of query vectors. If texts is a single string, the method processes it and returns a single-element list containing the query vector.
Related Issues
Method __get_embeddings in qdrant DB.
Solution and Design
Test Plan
Type of change
Checklist