Skip to content

Commit

Permalink
Merge pull request #98 from NeuralNext/main
Browse files Browse the repository at this point in the history
Update BatchPushResults.py
  • Loading branch information
ross-p-smith authored Dec 11, 2023
2 parents 0ad9ef1 + 366bed2 commit 402ee3a
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion code/batch/BatchPushResults.py
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ def batch_push_results(msg: func.QueueMessage) -> None:
file_sas = blob_client.get_blob_sas(file_name)
# Get file extension's processors
file_extension = file_name.split(".")[-1]
processors = list(filter(lambda x: x.document_type == file_extension, ConfigHelper.get_active_config_or_default().document_processors))
processors = list(filter(lambda x: lower(x.document_type) == lower(file_extension), ConfigHelper.get_active_config_or_default().document_processors))
# Process the file
document_processor.process(source_url=file_sas, processors=processors)
blob_client.upsert_blob_metadata(file_name, {'embeddings_added': 'true'})

1 comment on commit 402ee3a

@Nico0293
Copy link
Contributor

@Nico0293 Nico0293 commented on 402ee3a Dec 11, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hi,
This PR create an error: "Result: Failure Exception: NameError: name 'lower' is not defined"
It should be :

x.document_type.lower() == file_extension.lower()

#102

Please sign in to comment.