OpenAI Assistant - Function Calling
Hi everyone! I’m having an issue with function calling using the OpenAI Ask Assistant block.
My use case is simple: the user says their name, and the assistant should send this name to my API, which returns the corresponding surname.
6 Replies
FastAPI backend:
Typebot function code:
OpenAI function JSON:
What’s happening:
When I type:
“Hi! My name is Daniel. What is my surname?”
The assistant responds:
❌ “There was an error trying to retrieve your surname…”
BUT:
• The API is called (confirmed in FastAPI logs)
• It returns 200 OK
• The response is { "sobrenome": "Prazeres" }
So everything seems fine on the backend.
Has anyone encountered something like this? Am I missing something in the assistant config or function setup?
Thanks in advance 🙏


Use the HTTP request block, it's made for that: https://docs.typebot.io/editor/blocks/integrations/http-request
Typebot Docs
HTTP Request - Typebot Docs
Should I be using the HTTP Request block separately and connect it somehow to the Ask Assistant? Because I only have the information “name” (it’s a example) during the conversation between the agent and the customer. My goal is trigger an agent function, send an information and retrieve an information, give that response to the agent and then answer the customer.
So sorry about that, I read your post too fast
See this section: https://docs.typebot.io/editor/blocks/logic/script#limitations-on-scripts-executed-on-server
Typebot Docs
Script block - Typebot Docs