Member-only story
Journey to Explore Generative AI
Combine the Power of ChatGPT with Your API Service
Empower ChatGPT to Query Your API and Deliver Conversational Results
In my previous article, I shared how to get ChatGPT to generate structured outputs, making it easier to process the results — like calling another API, for example. However, there’s a limitation: the response is often rigid and lacks the conversational, engaging tone we typically expect from ChatGPT.
But what if we want the best of both worlds? A dynamic, chatty response and the ability to process structured data behind the scenes? How can we achieve that?
The good news is that ChatGPT offers Function Calling capability in it’s result. This powerful feature allows you to integrate your own APIs as callable functions, enabling ChatGPT to embed specific inputs and real-time data directly into its responses. In this article, I’ll show you how to set it up and make ChatGPT interact seamlessly with your API, with actual example in Python code below.