OvidijusParsiunas / deep-chat

Fully customizable AI chatbot component for your website
https://deepchat.dev
MIT License
1.48k stars 235 forks source link

allow multiple `files_tool_type` for OpenAI Assistants API #279

Closed bruffridge closed 1 week ago

bruffridge commented 1 week ago

Deep-chat 2.0 added support for v2 Assistants API. It also changed how uploaded files are handled. https://github.com/OvidijusParsiunas/deep-chat/issues/190#issuecomment-2138206061 Now there is a files_tool_type parameter that determines which tool operates on file uploads. So instead of letting OpenAI decide which tool to use, all uploaded files are handled by the tool set by the parameter. This means ALL uploaded files can only be handled by one tool. We want it to be based on the file and what the user asks. For example, uploaded images should be passed to the gpt-4o for vision. Other files such as excel and csv the user might want visualized via code_interpreter. PDFs and .docx files they may want summarized via file_search.

Would this be possible to refactor to reenable this functionality, the way it was before deep-chat 2.0? If so, I could start to work on a PR.

OvidijusParsiunas commented 1 week ago

Hey @bruffridge.

The files_tool_type property allows you to pass a function which you can use to determine which tool you want to use for the uploaded files.

I believe this is why you closed the PR, but want to make sure.

Thanks!