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
base: main
Are you sure you want to change the base?
Conversation
@logan-markewich can you take a look at this when you have some time, please? |
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.
@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... |
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