mirror of
https://github.com/run-llama/llama_cloud_services.git
synced 2026-06-30 21:47:56 -04:00
remove extension filter (#1075)
* remove extension filter * changeset * Update ninety-goats-look.md Make it a patch version * Update package.json back out of version bump * Update pyproject.toml back out of version bump * Update package.json back out of version bump * Update pyproject.toml back out of version bump --------- Co-authored-by: Adrian Lyjak <adrianlyjak@gmail.com>
This commit is contained in:
committed by
GitHub
parent
812e2f7d72
commit
19cbb25631
@@ -0,0 +1,6 @@
|
||||
---
|
||||
"llama_parse": patch
|
||||
"llama-cloud-services-py": patch
|
||||
---
|
||||
|
||||
Remove extension filter
|
||||
@@ -751,11 +751,9 @@ class LlamaParse(BasePydanticReader):
|
||||
file_path = str(file_input)
|
||||
file_ext = os.path.splitext(file_path)[1].lower()
|
||||
if file_ext not in SUPPORTED_FILE_TYPES:
|
||||
raise Exception(
|
||||
f"Currently, only the following file types are supported: {SUPPORTED_FILE_TYPES}\n"
|
||||
f"Current file type: {file_ext}"
|
||||
)
|
||||
mime_type = mimetypes.guess_type(file_path)[0]
|
||||
mime_type = "application/octet-stream"
|
||||
else:
|
||||
mime_type = mimetypes.guess_type(file_path)[0]
|
||||
# Open the file here for the duration of the async context
|
||||
# load data, set the mime type
|
||||
fs = fs or get_default_fs()
|
||||
|
||||
Reference in New Issue
Block a user