Thomas
Thomas4mo ago

querying db through chatgpt: 400 Invalid schema for function

I am trying to query a firestore database through chatgpt. I always receive an error statement: "400 Invalid schema for function 'firestore-Collection-Query': In context=('properties', 'orderBy'), array schema missing items" My chatgpt instructions include: "When you are given tools to use, you must use them following the guidelines for each tool. Guidelines: 1. When you start the conversation, you must use the 'firestore-collection-query' tool to retrieve relevant keywords." The firebase node works if not used in context of the chatgpt query... Thanks!
No description
Solution:
@Thomas 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 remove the filter or orderBy form the node, alternatively, you can add the use our Firestore Collection Video - https://www.youtube.com/watch?v=B0g0FWqWSLg.
Jump to solution
8 Replies
Solution
Gaurav Chadha
Gaurav Chadha4mo ago
@Thomas 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 remove the filter or orderBy form the node, alternatively, you can add the use our Firestore Collection Video - https://www.youtube.com/watch?v=B0g0FWqWSLg.
Thomas
Thomas4mo ago
Thanks @Gaurav Chadha! Created a proxy firebase node and it works now - BUT only until gpt4. For gpt4o I receive: 400 The requested model 'gpt-4o' cannot be used with the Assistants API in v1. Follow the migration guide to upgrade to v2: https://platform.openai.com/docs/assistants/migration.
Gaurav Chadha
Gaurav Chadha4mo ago
Are you using old Assistant node? Can you delete and add it again from the node explorer.
Thomas
Thomas4mo ago
ah - i started working from a template
Gaurav Chadha
Gaurav Chadha4mo ago
BuildShip's Assistant node already supports v2
Thomas
Thomas4mo ago
ok! greate it´s working, thanks @Gaurav Chadha !!!
Gaurav Chadha
Gaurav Chadha4mo ago
Cool, can you share which template you selected? We'll update it if required.
Thomas
Thomas4mo ago
I think it was Database Query Assistant ... it was an assistant with firebase sorry not sure to be honest