Lee-W commented on code in PR #73053:
URL: https://github.com/apache/airflow/pull/73053#discussion_r3998422956
##########
providers/common/ai/src/airflow/providers/common/ai/operators/document_loader.py:
##########
@@ -140,6 +143,8 @@ def __init__(
raise ValueError("Provide exactly one of 'source_path' or
'source_bytes', not both.")
if source_path is None and source_bytes is None:
raise ValueError("Provide exactly one of 'source_path' or
'source_bytes'.")
+ if source_bytes is not None and file_type is None:
+ raise ValueError("'file_type' is required when using
'source_bytes' (e.g. '.pdf').")
Review Comment:
```suggestion
raise ValueError("'file_type' is required when using
'source_bytes'.")
```
I think we can ignore example here. the user should know what this is if
they provide it
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]