mirror of
https://github.com/QuivrHQ/quivr.git
synced 2024-12-14 17:03:29 +03:00
feat(assistant): check if key of file is same as filename uploaded
This commit is contained in:
parent
3400b8633f
commit
8f04d832ac
@ -57,6 +57,11 @@ class SummaryAssistant(ITO):
|
||||
raise ValueError("The key of the file should be doc_to_summarize")
|
||||
if not self.input.inputs.files[0].value:
|
||||
raise ValueError("No file was uploaded")
|
||||
# Check if name of file is same as the key
|
||||
if not self.input.inputs.files[0].value == self.files[0].filename:
|
||||
raise ValueError(
|
||||
"The key of the file should be the same as the name of the file"
|
||||
)
|
||||
if not (
|
||||
self.input.outputs.brain.activated or self.input.outputs.email.activated
|
||||
):
|
||||
|
Loading…
Reference in New Issue
Block a user