Quantcast
Channel: Active questions tagged python - Stack Overflow
Viewing all articles
Browse latest Browse all 13891

llama_index integration with Milvus database

$
0
0

I'm working on setting up indexing for my Milvus database. I'm not keen on using the default indexing it offers; instead, I'm looking to get the llama_index up and running.

I gave implementing llama_index a shot, but now I'm kinda second-guessing if I got it right.

If any of y'all out there know the ins and outs of this and can take a peek at my code, I'd really appreciate it.

Thanks a bunch! 🤠👩‍💻👨‍💻

            from llama_index import VectorStoreIndex            from llama_index.vector_stores import MilvusVectorStore            # Setting up the Vector Store and creating the index            vector_store = MilvusVectorStore(                uri = self.milvus_host,                token=self.milvus_token,                collection_name=collection_name            )            index = VectorStoreIndex.from_vector_store(vector_store=vector_store)            # Creating index for the specified field in the collection            collection = Collection(collection_name)            collection.create_index(                field_name=field_name,                index_params=index,                index_name=collection_name            )

Viewing all articles
Browse latest Browse all 13891

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>