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
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -98,7 +98,7 @@ def _process_file(
Document(
id=f"FILE_CONNECTOR__{file_name}", # add a prefix to avoid conflicts with other connectors
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,
semantic_identifier=file_display_name_override or file_name,