Jippr
Jippr5w ago

get firebase collection data

Hi as of a test I am trying to collect my customer data through a node however the OpenAI assistant that should use this node throws this error: 400 Invalid schema for function 'getCustomers': In context=('properties', 'orderBy'), array schema missing items. I am not sure what I am doing wrong here.
Solution:
Hi @Jippr, Currently the OpenAI Assitatant throws an error if it has a ndoe (tool) which has an array input field. As a solution you can make the query outside the Assistant node and then add an empty node inside the Assistant then store the variable output of the Firestore Collection Query node to make your workflow work. Or alternatlveiy you can use the Anthropic Claude Assistant which will work even with array inputs....
Jump to solution
5 Replies
AI Support
AI Support5w ago
AI Support Bot Information
<@1280930825285800041> you can react on the relevant answer (message) with a ✅ in this thread when you think it has been solved, by the bot or by a human! Anyone can react on this message with a ❌ if the GPT bot is unhelpful or hallucinating answers. Please note: Team members will review and answer the questions on best efforts basis.
Solution
Gaurav Chadha
Gaurav Chadha5w ago
Hi @Jippr, Currently the OpenAI Assitatant throws an error if it has a ndoe (tool) which has an array input field. As a solution you can make the query outside the Assistant node and then add an empty node inside the Assistant then store the variable output of the Firestore Collection Query node to make your workflow work. Or alternatlveiy you can use the Anthropic Claude Assistant which will work even with array inputs.
Jippr
Jippr5w ago
Hi @Gaurav Chadha , thanks for your help this brings me a bit further and apparently OpenAI Assistant or Buildship has some bug why it does not work. I still have to learn a lot I think about this Buildship platform, this 'empty node'-stuff is new to me. I found it, but now I am struggling with getting the data out in a way that OpenAI Assistant can actually do something with it. It does recognize that I have data, but it is not in the right format.
Gaurav Chadha
Gaurav Chadha4w ago
Hi @Jippr, we are already tracking this issue with OpenAI Assistant, the formatting of the data from the assistant isn't related to this issue, you an add in instruction on how to you want your format your data.
Jippr
Jippr4w ago
Hi @Gaurav Chadha , I actually found how to solve the issue. In the Inputs of the Firestore node I need to add an "items" object in order to make OpenAI Assistant understand that the Order By parameters are a list of objects, instead of just a list like the node is defaulted on and which can only be set the right way through the code interpreter and not through UI as far as I know for now. So needed some analyzing effort of the code in order to pull this off correctly. "orderBy": { "items": { "required": [ "fieldName", "direction" ], "properties": { "direction": { "type": "string", "enum": [ "asc", "desc" ] }, "fieldName": { "type": "string" } }, "type": "object" }, "title": "Order By", "buildship": { "sensitive": false, "index": 4 }, "description": "Order results in desc or asc order.\nEg: [{fieldName: "asc"}] or [{fieldName: "desc"}]", "default": [], "type": "array", "pattern": "" }