Groq Function Calling Issue
I'm building an AI-powered Inventory Management System using n8n, Airtable, and the Groq API with an OpenAI-compatible chat model.
I've completed the CRUD operations (Create, Read, Update, Delete), but I'm facing an inconsistent issue.
Sometimes the AI works perfectly:
✅ Adds a new product
✅ Updates a product
✅ Deletes a product
✅ Retrieves inventory data
However, other times, when I ask something like:
"Add a new product: Keyboard, buy price 15, sell price 20, current stock 40, minimum stock 5"
instead of calling the tool correctly, it returns the function call as plain text:
<function>Create_a_record_in_Airtable</function>{"productName":"Keyboard","buyPrice":15,"sellPrice":20,"currentStock":40,"minimumStock":5}
Instead of actually executing the tool.
I'm using the Groq API through the OpenAI-compatible endpoint.
Has anyone experienced this behavior?
Is this a limitation of Groq's OpenAI-compatible API?
Is there a specific model that has more reliable tool/function calling?
Could this be a prompt issue, or am I missing a required configuration in n8n?
Are there best practices to make function calling more consistent?
Any advice or suggestions would be greatly appreciated. Thanks!
3
4 comments
Mahmish Munawar
2
Groq Function Calling Issue
AI Automation Agency Hub
skool.com/learn-ai
Learn and become genuinely proficient in AI to get paid for it. From the creators of the AI Automation Agency model.
Leaderboard (30-day)
Powered by