fix: url metadata for all datatypes (#613)

This commit is contained in:
cachho
2023-09-13 19:19:48 +02:00
committed by GitHub
parent 701d0b21ef
commit 79efa51941
4 changed files with 116 additions and 16 deletions

View File

@@ -11,9 +11,7 @@ class LocalQnaPairLoader(BaseLoader):
question, answer = content
content = f"Q: {question}\nA: {answer}"
url = "local"
meta_data = {
"url": url,
}
meta_data = {"url": url, "question": question}
doc_id = hashlib.sha256((content + url).encode()).hexdigest()
return {
"doc_id": doc_id,