OPENAI Functions and Tools
I'm trying this example as it's explained in the help page: https://docs.typebot.io/editor/blocks/integrations/openai
But I'm getting the stringified JSON as an answer:
{"tool_calls":[ {"id": "call_AmJRCysQpf6IsXUXPqC8an2q", "type": "function", "function": {"name": "getWeather", "arguments": "{"city":"Paris"}"}}]}
Instead of an LLM message like: The weather in Paris is sunny and warm, indeed!
So, I do not understand the purpose of the Code:
if (city === 'Paris') {
return 'Sunny and warm'
} else {
return 'Rainy and cold'
}

3 Replies
Indeed, it seems it does not work anymore. I'm checking how I can fix this
It's only happening on production so I have a hard time debugging it... Tracking the issue here: https://github.com/baptisteArno/typebot.io/issues/1211
GitHub
Tool call is not working when message is streaming · Issue #1211 · ...
This bug only happens in production 😨
Thanks, Baptiste!