passive-yellow
passive-yellowβ€’3mo ago

[Solved βœ…] DROPBOX_SEARCH_FILE_OR_FOLDER: LangChain Tool call not formatted properly

I'm seeing an issue when trying to use this tool with LangChain and OpenAI GPT 4o Mini (hosted in Azure OpenAI Studio). The tool call message looks like this:
{
'name': 'DROPBOX_SEARCH_FILE_OR_FOLDER',
'args': {
'match_field_options': {
'include_highlights': True
},
'options': {
'file_status': 'active',
'filename_only': False,
'max_results': 10,
'path': '/'
},
'query': 'Greg tax documents 2023'
},
'id': 'call_ZvjR6rwXg7gXZcetuXVejrOx',
'type': 'tool_call'
}
{
'name': 'DROPBOX_SEARCH_FILE_OR_FOLDER',
'args': {
'match_field_options': {
'include_highlights': True
},
'options': {
'file_status': 'active',
'filename_only': False,
'max_results': 10,
'path': '/'
},
'query': 'Greg tax documents 2023'
},
'id': 'call_ZvjR6rwXg7gXZcetuXVejrOx',
'type': 'tool_call'
}
The Tool message error I'm receiving is:
{
"successfull": false,
"data": {},
"error": "Invalid request data provided\\n- Input should be a valid dictionary or instance of MatchFieldOptions on parameter `match_field_options`\\n- Input should be a valid dictionary or instance of SearchOptions on parameter `options`"
}
{
"successfull": false,
"data": {},
"error": "Invalid request data provided\\n- Input should be a valid dictionary or instance of MatchFieldOptions on parameter `match_field_options`\\n- Input should be a valid dictionary or instance of SearchOptions on parameter `options`"
}
Any ideas what I might be doing wrong?
8 Replies
Soham
Sohamβ€’3mo ago
Checking this.
ambitious-aqua
ambitious-aquaβ€’3mo ago
I found that there is an issue with nested schemas in our langchain. Fixing that. Meanwhile, could you try our openai directly: https://gist.github.com/kaavee315/f16715b7a229380850f57c201d368961 It has code both for OpenAI assistant and chat completion whichever youn want to use. And I will come back on the langchain in a bit.
Gist
Dropbox search with OpenAI
Dropbox search with OpenAI. GitHub Gist: instantly share code, notes, and snippets.
passive-yellow
passive-yellowOPβ€’3mo ago
Thanks @kaavee . I'll wait for the fix to come around. I don't have a great way to bring plain OpenAI into my platform right now
ambitious-aqua
ambitious-aquaβ€’3mo ago
Hey @G-Rage, this has been fixed. We changed the schema a bit as Langchain tools perform weirdly with nested schemas. Please try and let me know if you face any issues.
passive-yellow
passive-yellowOPβ€’3mo ago
Thanks @kaavee! Is this fix available in a new release? Or just pushed to the repo?
ambitious-aqua
ambitious-aquaβ€’3mo ago
It doesn't need a new release.
passive-yellow
passive-yellowOPβ€’3mo ago
ah -- server side. Thanks! Confirmed that the fix is working
ambitious-aqua
ambitious-aquaβ€’3mo ago
Awesome, let me know if you face any other issue πŸ™‚

Did you find this page helpful?