Skip to content
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

How can I perform data analysis on a specific file using Python? #33

Open
murong1 opened this issue Nov 5, 2024 · 5 comments
Open

How can I perform data analysis on a specific file using Python? #33

murong1 opened this issue Nov 5, 2024 · 5 comments

Comments

@murong1
Copy link

murong1 commented Nov 5, 2024

I want to analyze the data in a particular Excel file using Python. I attempted to use the pandas library to load the file and calculate the sum of a specific column ('Quantity'). However, I encountered a 'FileNotFoundError' indicating that the file could not be located. How can I resolve this issue, and what are the best practices for loading and analyzing data from an Excel file in Python?
image
image

@EtiennePerot
Copy link
Owner

Sorry, there is currently no support for reading uploaded files, so this won't work. However, if your file is downloadable from an online source, you can ask the LLM to generate code that downloads the file and then does analysis on it.

I'll keep this issue open to track whether Open WebUI allows tools and functions to access uploaded files.

@latent-variable
Copy link

I am also interested in this functionality!

@garyfanhku
Copy link

Sorry, there is currently no support for reading uploaded files, so this won't work. However, if your file is downloadable from an online source, you can ask the LLM to generate code that downloads the file and then does analysis on it.

I'll keep this issue open to track whether Open WebUI allows tools and functions to access uploaded files.

Would it be possible for the tools/functions to access Minio?

@EtiennePerot
Copy link
Owner

@garyfanhku You can ask the LLM to generate code that fetches data from Minio or any other solution that can be remotely accessed programmatically. It wouldn't make sense to manually implement each one of them manually.
That being said I realize that it would be good to have easier support for automatically installing Python packages and libraries so that LLM-generated code can use more than just the Python standard library. That work is tracked in #15.

@EtiennePerot
Copy link
Owner

EtiennePerot commented Nov 16, 2024

I'll keep this issue open to track whether Open WebUI allows tools and functions to access uploaded files.

I've looked into this a bit and, for my own reference (or for whoever wants to work on implementing this): Open WebUI does allow tools and functions to allow user-uploaded files.

Example of a function that accesses files: https://openwebui.com/f/omar97/visualize - however this one currently erroneously assumes that the installation is single-user, and so it uses Files.get_files() to get a list of files, which lists the uploaded files from all users. They instead need to be filtered by user_id using Files.get_files_by_user_id. Example of a function that looks up the current user's ID: https://openwebui.com/f/mhwhgm/auto_tool_v2.

The ID of the conversation that a file was uploaded from doesn't seem to be recorded, so I think this means all files from a user (or perhaps the most recent N files, to put a limit on resource usage) would need to be available to all code executions.

This was referenced Jan 21, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants