Embed chat GPT with web application

Hi,
Trying to integrate chatbot (chatGPT services can answer user’s question) to my web application. it is complete business application, and it stores the application data in JSON format in MongoDB.
Looking for the best way / approach to leverage the chatGPT services / API’s into my application that should generate the text answers / chat completions based on my application data.
could someone share your ideas, suggestions or approaches for the same ?
thanks
Boopathy