How to Create a Chatbot that fetches data from External API?

Hello, I am new to OpenAI, I want to create a Chatbot and embed in my web application. The chatbot should be able to connect to my API and fetch the data. I have went through the actions getting started page where the external api is called using schema but this actions I think are created for chatgpt interface (chatgpt,com) but I am looking to do it using OpenAI. Should I use assistant for chatbots? If I use assistant how would it connect to my API to generate responses? How to achieve this?