Skip to content

Commit 4f0b5a6

Browse files
author
mr-unstructured
committed
more detailed structured_output
1 parent 26365d4 commit 4f0b5a6

File tree

1 file changed

+2
-5
lines changed
  • unstructured_ingest/v2/processes/connectors

1 file changed

+2
-5
lines changed

unstructured_ingest/v2/processes/connectors/discord.py

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -68,27 +68,24 @@ def run(self, **kwargs: Any) -> Generator[FileData, None, None]:
6868
@requires_dependencies(["discord"], extras="discord")
6969
def get_channel_file_data(self, channel_id: str, client) -> Optional[FileData]:
7070
# Fetch channel metadata
71-
channel_metadata = {} # Replace with actual metadata retrieval
7271
date_created = dt.datetime.utcnow().isoformat()
7372
identifier = channel_id
7473
source_identifiers = SourceIdentifiers(
75-
filename=f"{channel_id}.txt",
74+
filename=channel_id,
7675
fullpath=channel_id,
7776
rel_path=channel_id,
7877
)
7978
metadata = FileDataSourceMetadata(
8079
date_created=date_created,
8180
date_modified=date_created,
8281
record_locator={"channel_id": channel_id},
83-
date_processed=str(dt.datetime.utcnow().timestamp()),
82+
date_processed=str(dt.datetime.utcnow().isoformat()),
8483
)
85-
additional_metadata = channel_metadata
8684
return FileData(
8785
identifier=identifier,
8886
connector_type=CONNECTOR_TYPE,
8987
source_identifiers=source_identifiers,
9088
metadata=metadata,
91-
additional_metadata=additional_metadata,
9289
)
9390

9491

0 commit comments

Comments
 (0)