Spaces:
Paused
Paused
Update app.py
Browse files
app.py
CHANGED
@@ -254,12 +254,10 @@ def generate_code_snippet(llm_choice, embed_model_choice, node_parser_choice, re
|
|
254 |
code_snippet += f"response_mode = '{response_mode}'\n\n"
|
255 |
|
256 |
# Vector store initialization
|
257 |
-
if vector_store_choice == "
|
258 |
-
code_snippet += "
|
259 |
-
code_snippet += "
|
260 |
-
code_snippet += "vector_store =
|
261 |
-
elif vector_store_choice == "Milvus":
|
262 |
-
code_snippet += "vector_store = MilvusVectorStore(dim=1536, overwrite=True)\n"
|
263 |
elif vector_store_choice == "Qdrant":
|
264 |
code_snippet += "client = qdrant_client.QdrantClient(location=':memory:')\n"
|
265 |
code_snippet += "vector_store = QdrantVectorStore(client=client, collection_name='sampledata')\n"
|
|
|
254 |
code_snippet += f"response_mode = '{response_mode}'\n\n"
|
255 |
|
256 |
# Vector store initialization
|
257 |
+
if vector_store_choice == "Pinecone":
|
258 |
+
code_snippet += "pc = Pinecone(api_key=os.environ['PINECONE_API_KEY'])\n"
|
259 |
+
code_snippet += "index = pc.Index('test')\n"
|
260 |
+
code_snippet += "vector_store = PineconeVectorStore(pinecone_index=index)\n"
|
|
|
|
|
261 |
elif vector_store_choice == "Qdrant":
|
262 |
code_snippet += "client = qdrant_client.QdrantClient(location=':memory:')\n"
|
263 |
code_snippet += "vector_store = QdrantVectorStore(client=client, collection_name='sampledata')\n"
|