File Connector Metadata (#3089)

This commit is contained in:
Yuhong Sun 2024-11-08 10:49:59 -08:00 committed by GitHub
parent cf5d394d39
commit 99fbfba32f
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -123,9 +123,13 @@ def _process_file(
"filename",
"file_display_name",
"title",
"connector_type",
]
}
source_type_str = all_metadata.get("connector_type")
source_type = DocumentSource(source_type_str) if source_type_str else None
p_owner_names = all_metadata.get("primary_owners")
s_owner_names = all_metadata.get("secondary_owners")
p_owners = (
@ -145,7 +149,7 @@ def _process_file(
sections=[
Section(link=all_metadata.get("link"), text=file_content_raw.strip())
],
source=DocumentSource.FILE,
source=source_type or DocumentSource.FILE,
semantic_identifier=file_display_name,
title=title,
doc_updated_at=final_time_updated,