Al_B4w ago

Errors using Firestore Collection Query as a function of OpenAI Assistant

Hi - I’m trying to use the Firestore - Collection Query Node as a function of an OpenAI Assistant. Unfortunately, I keep encountering errors no matter how I set things up. If I set the 'Filters' and 'Order By' fields blank or auto-filled, I receive the error message: 400 Invalid schema for function 'meal_collection_collection': In context=('properties', 'orderBy'), array schema missing items For autofill, I leave the default field name and instructions. If I remove the 'Filters' and 'Order By' fields from the node entirely, I receive the error message: Value for argument "fieldPath" is not a valid field path. Paths can't be empty and must not contain "*~/[]". If I test the Firestore node on its own without either field, the node is successful. Any tips on how I can get this to work? I've searched the documentation and YouTube and can't seem to get this to work in any way. 😦 Thanks in advance!
No description
No description
3 Replies
Gaurav Chadha
Gaurav Chadha3w ago
hi @Al_B, Did you also commented the code for filters and orderBy in node logic? You can clone this worklow and it should work then.
BuildShip - Visual backend workflow builder
Visually build workflows and powerful backend logic for your apps. Powered by AI, connect to anything with or without code.
Christopher303w ago
Hi @Al_B ! I had a similar issue, and I "solved" it by using OpenAI assistant to call other workflows inside the Buildship. Basically, you have the "Buildship Execute Workflow" node as a function inside OpenAI assistant, and the workflow that is being called executes the Firestore query and then returns results back to assistant.
Al_B3w ago
@Gaurav Chadha @Christopher30 - Thank you both for your insights, much appreciated! I will take a look and report back soon 👍 One thing I did notice today is that the functionality works well when I: 1) Delete 'Order By' but keep and Auto-Fill 'Filters' 2) Provide field by field details of the collection in the Assistant instructions The 'Order By' seems to be the culprit in my testing!