-
Notifications
You must be signed in to change notification settings - Fork 336
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Enable support for custom filesystem #117
Conversation
@logan-markewich can you take a look at this when you have some time, please? |
llama_parse/base.py
Outdated
fs = fs or get_default_fs() | ||
with fs.open(file_path, "rb") as f: | ||
mime_type = mimetypes.guess_type(str_file_path)[0] | ||
files = {"file": (self.__get_filename(f), f, mime_type)} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't think this works, at least locally, it doesn't work for me
Since we already have the path, can't we use that?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I am using it in production right now and it is working properly. What is the error that you are getting locally?
The issue with the path is that I've seen situations in production where people upload a file with .txt
but the file is actually a .csv
and it doesn't work.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
:sigh: this still doesn't work guys lol
>>> from llama_parse import LlamaParse
>>> documents = LlamaParse(api_key="llx-...").load_data("2023.acl-srw.0.pdf")
Error while parsing the file '2023.acl-srw.0.pdf': '_io.BufferedReader' object has no attribute 'full_name'
>>>
@logan-markewich whenever you have a chance could you please review, currently llama parse is giving me the fs error when trying to use it with GCS Reader parser = LlamaParse(result_type="markdown", api_key=LLAMA_PARSE_API_KEY,verbose=True, show_progress=True)
LlamaParse.load_data() got an unexpected keyword argument 'fs'. Skipping... |
@logan-markewich any updates here? I've been using this fix in prod for a while without any issues |
any timeline on when this PR will get merged? my team is also blocked by not having this featue. does anyone know a current work around to load files that are not local in your directory? |
this still doesn't work 😅
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is still broken actually, see above
Ok, I think this works, but haven't actually tested it with an external file system |
Thanks @logan-markewich and @thiagosalvatore! |
Custom FileSystems that are now available on llama-index were not available on llama-parse. We can now use it to download files using any reader like S3Reader.
Fixes #116