From 99e2036119f1e65470dcb11fecf8fa501abd79cc Mon Sep 17 00:00:00 2001 From: "l.gabrysiak" Date: Sun, 2 Mar 2025 21:17:21 +0100 Subject: [PATCH] dodanie "contentType": "publication" do kolekcji --- manual.py | 6 ++++-- monitoring.py | 6 ++++-- 2 files changed, 8 insertions(+), 4 deletions(-) diff --git a/manual.py b/manual.py index 4850d56..31b5696 100644 --- a/manual.py +++ b/manual.py @@ -78,7 +78,8 @@ def add_to_weaviate(file_name, content, content_hash): properties={ "fileName": file_name, "content": content, - "contentHash": content_hash + "contentHash": content_hash, + "contentType": "publication" } ) print(f"Dodano dokument {file_name} do Weaviate.") @@ -130,7 +131,8 @@ if __name__ == "__main__": properties=[ Property(name="content", data_type=DataType.TEXT), Property(name="fileName", data_type=DataType.TEXT), - Property(name="contentHash", data_type=DataType.TEXT) # Nowe pole + Property(name="contentHash", data_type=DataType.TEXT), # Nowe pole + Property(name="contentType", data_type=DataType.TEXT) # Nowe pole ], vectorizer_config=Configure.Vectorizer.text2vec_transformers() ) diff --git a/monitoring.py b/monitoring.py index f2dac38..2cab1ff 100644 --- a/monitoring.py +++ b/monitoring.py @@ -91,7 +91,8 @@ def add_to_weaviate(file_name, content, content_hash): properties={ "fileName": file_name, "content": content, - "contentHash": content_hash + "contentHash": content_hash, + "contentType": "publication" } ) print(f"Dodano dokument {file_name} do Weaviate.") @@ -188,7 +189,8 @@ if __name__ == "__main__": properties=[ Property(name="content", data_type=DataType.TEXT), Property(name="fileName", data_type=DataType.TEXT), - Property(name="contentHash", data_type=DataType.TEXT) # Nowe pole + Property(name="contentHash", data_type=DataType.TEXT), # Nowe pole + Property(name="contentType", data_type=DataType.TEXT) # Nowe pole ], vectorizer_config=Configure.Vectorizer.text2vec_transformers() )