MCPcopy Create free account
hub / github.com/nlweb-ai/NLWeb / get_documents_from_csv

Function get_documents_from_csv

AskAgent/python/data_loading/qdrant_load.py:32–43  ·  view source on GitHub ↗

Reads and parses documents from a CSV-style text file

(csv_file_path, site)

Source from the content-addressed store, hash-verified

30
31
32def get_documents_from_csv(csv_file_path, site):
33 """Reads and parses documents from a CSV-style text file"""
34 documents = []
35 with open(csv_file_path, encoding="utf-8") as file:
36 for line in file:
37 if line.strip():
38 try:
39 docs = documentsFromCSVLine(line, site)
40 documents.extend(docs)
41 except ValueError as e:
42 print(f"Skipping row due to error: {e!s}")
43 return documents
44
45
46async def upload_documents_to_database(documents: list[dict[str, Any]], database: str | None = None):

Callers 1

upload_data_from_csvFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected