Spaces:
Runtime error
Runtime error
Update ingest.py
Browse files
ingest.py
CHANGED
@@ -13,14 +13,17 @@ documents = loader.load()
|
|
13 |
text_splitter = RecursiveCharacterTextSplitter(chunk_size=700, chunk_overlap=70)
|
14 |
texts = text_splitter.split_documents(documents)
|
15 |
|
16 |
-
url = "http://127.0.0.1:6333" # This is the same URL that must match Step 4d
|
17 |
-
|
18 |
-
|
|
|
19 |
|
20 |
qdrant = Qdrant.from_documents(
|
21 |
texts,
|
22 |
embeddings,
|
23 |
-
url=
|
|
|
|
|
24 |
prefer_grpc=False,
|
25 |
collection_name="vector_db"
|
26 |
)
|
|
|
13 |
text_splitter = RecursiveCharacterTextSplitter(chunk_size=700, chunk_overlap=70)
|
14 |
texts = text_splitter.split_documents(documents)
|
15 |
|
16 |
+
# url = "http://127.0.0.1:6333" # This is the same URL that must match Step 4d
|
17 |
+
qdrant_api_key = 'ic_WPSW7zUEOYzJIbHAYKVUxTf7xVXxFfJgTN6UsnvcuXGwkRPGx3g'
|
18 |
+
qdrant_url = 'https://ea51a65a-6fad-48ce-b571-846d3b496882.us-east4-0.gcp.cloud.qdrant.io'
|
19 |
+
|
20 |
|
21 |
qdrant = Qdrant.from_documents(
|
22 |
texts,
|
23 |
embeddings,
|
24 |
+
url=qdrant_url,
|
25 |
+
port=6333,
|
26 |
+
api_key=qdrant_api_key,
|
27 |
prefer_grpc=False,
|
28 |
collection_name="vector_db"
|
29 |
)
|