You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
26 lines
657 B
26 lines
657 B
1 year ago
|
from langchain.document_loaders import CSVLoader
|
||
11 months ago
|
|
||
1 year ago
|
from swarms.memory import qdrant
|
||
|
|
||
1 year ago
|
loader = CSVLoader(
|
||
1 year ago
|
file_path="../document_parsing/aipg/aipg.csv",
|
||
|
encoding="utf-8-sig",
|
||
1 year ago
|
)
|
||
1 year ago
|
docs = loader.load()
|
||
|
|
||
|
|
||
|
# Initialize the Qdrant instance
|
||
|
# See qdrant documentation on how to run locally
|
||
1 year ago
|
qdrant_client = qdrant.Qdrant(
|
||
|
host="https://697ea26c-2881-4e17-8af4-817fcb5862e8.europe-west3-0.gcp.cloud.qdrant.io",
|
||
|
collection_name="qdrant",
|
||
|
)
|
||
1 year ago
|
qdrant_client.add_vectors(docs)
|
||
|
|
||
|
# Perform a search
|
||
|
search_query = "Who is jojo"
|
||
|
search_results = qdrant_client.search_vectors(search_query)
|
||
|
print("Search Results:")
|
||
|
for result in search_results:
|
||
|
print(result)
|