Fix broken link when specified in metadata (#1200)

This commit is contained in:
Dan Brown
2024-03-09 21:49:15 +01:00
committed by GitHub
parent e752e6d671
commit fd5294ed82

View File

@@ -98,7 +98,7 @@ def _process_file(
Document( Document(
id=f"FILE_CONNECTOR__{file_name}", # add a prefix to avoid conflicts with other connectors id=f"FILE_CONNECTOR__{file_name}", # add a prefix to avoid conflicts with other connectors
sections=[ sections=[
Section(link=metadata.get("link"), text=file_content_raw.strip()) Section(link=file_metadata.get("link"), text=file_content_raw.strip())
], ],
source=DocumentSource.FILE, source=DocumentSource.FILE,
semantic_identifier=file_display_name_override or file_name, semantic_identifier=file_display_name_override or file_name,