Skip to content

Commit

Permalink
File Connector Metadata (#3089)
Browse files Browse the repository at this point in the history
  • Loading branch information
yuhongsun96 authored Nov 8, 2024
1 parent cf5d394 commit 99fbfba
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion backend/danswer/connectors/file/connector.py
Original file line number Diff line number Diff line change
Expand Up @@ -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 = (
Expand All @@ -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,
Expand Down

0 comments on commit 99fbfba

Please sign in to comment.