TransformerOptimus / SuperAGI

<⚡️> SuperAGI - A dev-first open source autonomous AI agent framework. Enabling developers to build, manage & run useful autonomous agents quickly and reliably.
https://superagi.com/
MIT License
15.48k stars 1.86k forks source link

Bug: __get_embeddings Method to Handle Both List and Single String input #1420

Open python296 opened 6 months ago

python296 commented 6 months ago

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

CLAassistant commented 6 months ago

CLA assistant check
All committers have signed the CLA.