VRSEN / agency-swarm

The only reliable agent framework built on top of the latest OpenAI Assistants API.
https://vrsen.github.io/agency-swarm/
MIT License
2.05k stars 537 forks source link

File Handling not working properly when uploaded from the chatbot interface. #125

Open Vansh-Techseria2024 opened 1 month ago

Vansh-Techseria2024 commented 1 month ago

I am working with CV Analyzing, when I upload file from the chatbot interface , the file ID generated but in the terminal throws the FileNotFound Error. Please let me know how can I change the default file_path from the source code in a way that it handles the uploaded file.

VRSEN commented 1 month ago

Hey, there was a problem with message file assignment based on file type, but I am not sure if it's related. Can you please pull and install from main and let me know if this fixes it? If not, please send an error message as well.

Vansh-Techseria2024 commented 1 month ago

Hello , Thank you for the git commit and making the effort to solve the issue raised regarding the file uploading. I will make sure to update you after pulling from the main branch and running the necessary tests,

Thank you Vansh Limbachiya.


From: Arsenii Shatokhin @.> Sent: 27 May 2024 10:05 To: VRSEN/agency-swarm @.> Cc: Vansh Limbachiya @.>; Author @.> Subject: Re: [VRSEN/agency-swarm] File Handling not working properly when uploaded from the chatbot interface. (Issue #125)

Hey, there was a problem with message file assignment based on file type, but I am not sure if it's related. Can you please pull and install from main and let me know if this fixes it? If not, please send an error message as well.

— Reply to this email directly, view it on GitHubhttps://github.com/VRSEN/agency-swarm/issues/125#issuecomment-2132625743, or unsubscribehttps://github.com/notifications/unsubscribe-auth/BIRCHZOBDRKDC7MSYDMDUO3ZEKZ2PAVCNFSM6AAAAABH2HN36CVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDCMZSGYZDKNZUGM. You are receiving this because you authored the thread.Message ID: @.***>

VRSEN commented 1 month ago

@Vansh-Techseria2024, remember you can't upload files into custom tools from Gradio. Gradio files are uploaded to OpenAI. If your BaseTool accepts a local file path, first add it to your local directory and then send the file path to the agent in the message.

Vansh-Techseria2024 commented 4 weeks ago

@VRSEN Thank you for the clarity regarding the function! I'll ,make sure to remember this point and then test the functionality, will update you soon about the results.

Regards!

Vansh-Techseria2024 commented 3 weeks ago

@VRSEN Hello Arsenii , As of our last discussion I tried to perform File Operations on a .pdf file while keeping your instructions in mind regarding to local path. Though the file was uploaded this time but its giving a different type of error:

raise self._make_status_error_from_response(err.response) from None openai.NotFoundError: Error code: 404 - {'error': {'message': 'Files [file-1h7q5s2k] were not found', 'type': 'invalid_request_error', 'param': None, 'code': None}}.

As you suggested I didn't uploaded it to Gradio but I have placed the file in Local Folder.