Skip to content

Commit ff09977

Browse files
committed
refactor: urls correctly added to references
1 parent f805605 commit ff09977

File tree

2 files changed

+7
-7
lines changed

2 files changed

+7
-7
lines changed

data_ingestion/crud_ragflow.py

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -87,14 +87,14 @@ def insert_metadata_ragflow(
8787

8888

8989
def main():
90-
directory = "/app/data_ingestion/faqs_output_md"
91-
db_name = "faq"
92-
# directory = "/app/data/documents"
93-
# db_name = "examination_regulations"
90+
# directory = "/app/data_ingestion/faqs_output_md"
91+
# db_name = "faq"
92+
directory = "/app/data/documents"
93+
db_name = "examination_regulations"
9494

9595
upload_files_ragflow(directory, db_name)
9696
# print(f"Files from {directory} uploaded to RAGFlow database '{db_name}'.")
97-
insert_metadata_ragflow(directory, db_name)
97+
# insert_metadata_ragflow(directory, db_name)
9898
print("Files updated")
9999

100100

src/chatbot/db/ragflow_client.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -46,14 +46,14 @@ def url_reference_askuos(self) -> str:
4646
@property
4747
def url_reference_web_uos(self):
4848
"""Extract metadata from markdown content."""
49-
49+
url = ""
5050
# Decode bytes to string if needed
5151

5252
match = re.search(r'url:\s*"([^"]+)"', self.content)
5353
if match:
5454
url = match.group(1)
5555

56-
return url or None
56+
return url
5757

5858
@property
5959
def page(self) -> int:

0 commit comments

Comments
 (0)