📢 Seeking Assistance: Building a Chatbot with OpenAI Language Models and Real-Time Database Integration

I am reaching out to the wonderful OpenAI community for some guidance and expertise regarding a chatbot project I’m currently working on.

I am in the process of building a chatbot using OpenAI’s powerful language models. However, I also have a specific requirement to integrate the chatbot with my own 3rd party database through its API. The goal is to generate answers that are not only based on the language model’s capabilities but also on real-time information fetched from my database.

If any of you have successfully accomplished this feat or have knowledge and experience in achieving such integration, I would be extremely grateful for your guidance and support. I believe that tapping into the collective knowledge and expertise of this community can help me navigate through the challenges and learn from your valuable insights.

So, if you have built a chatbot that leverages OpenAI’s language models and incorporates real-time information from a 3rd party database via its API, or if you know how to go about doing so, please reach out to me. Your expertise and advice would be of tremendous value to me and greatly appreciated.

I look forward to connecting with like-minded individuals who are passionate about chatbot development and leveraging the power of OpenAI’s language models.

I am trying a similar thing using tools

https://python.langchain.com/en/latest/modules/agents/tools/custom_tools.html

You can look at ChatGPT plugins as a reference model. You provide the LLM with an OpenAPI spec defining your API endpoint (which in your case would be in-front of your real-time database). The LLM is responsible for understanding the spec and for constructing correctly structured queries to the API.

Thats a good point. the tools abstraction has CHATGPT plugin also

https://python.langchain.com/en/latest/modules/agents/tools/examples/chatgpt_plugins.html

Shane,

Thank you! Would you consider building me the same for my particular use case?

The problem is decomposed into a client chatbot and into server side-services. The server-side service is really just vanilla REST, a lot of developers can handle that piece. If you don’t have a chatbot client then you’d need to look around for an existing tool or product.

Nice, that looks like the same approach I took here. You just pass the open api spec to ChatGPT for any service and it figures out how to communicate back.

@shane.isbell @joyasree78 would you guys be able to let me know if it worked?

Take a look at this repo GitHub - rajib76/langchain_examples: This repo consists of examples to use langchain

This repo implements a tool that gets the data from a postgresql database