SharpVector
SharpVector copied to clipboard
Providing embeddings instead of text
Is there a way to provide embeddings instead of text (AddText[Async])?
I'm using OpenAI embeddings, I've seen OpenAIMemoryVectorDatabase, but if I understand correctly it requests embedding for each text, and indeed it is sluggish as I have to handle hundreds of elements.
Instead I'd like to leverage OpenAI API EmbeddingClient.GenerateEmbeddingsAsync which allows to pass a bulk of texts once.
For sure it should be faster, and maybe cheaper.
What are your thoughts?
Thanks 🙂