I am working with langchain and ChromaDB in python and I see that I have two options when creating the vectorestore:
db = Chroma.afrom_texts(docs, embedding_function)
This first one returns: db = <coroutine object VectorStore.afrom_texts at 0x00000258DCDDF680>
db = Chroma.from_texts(docs, embedding_function)
And the second one: db= <langchain.vectorstores.chroma.Chroma at 0x258dcf80b20>
I guess the second one is the normal one, but has anyone used the first one? Anyone knows what is that <coroutine object VectorStore.afrom_texts at 0x00000258DCDDF680>
.
Besides. Is there a way to visualize the vectors, the numbers. I would like to explore a little bit. Thank you in advanced!
Just a learning question
Chroma.from_texts()
returns an instance of theChroma
class and is synchronous (and can be called as any other method in your code), whileChroma.afrom_texts()
returns a coroutine which means is asynchronous and needs to be awaited for as it runs "in the background":