Give OpenAI models internet access using LangChainšŸ¦œšŸ”—

Rubentak
7 min readMay 8, 2023

In this article, I will walk you through the basics of LangChain. I will explain what LangChain is and how to create a simple AI chatbot that can answer questions using OpenAIā€™s GPT language model and give GPT internet access using the SerpApi.

The next chapter of the AI revolution is here!

Drawing: MalachkovaK

To start off, I hear you wondering ā€œWhat is this LangChain thing that I have been hearing so much about?ā€

LangChain is a framework designed to create software applications that utilise large language models (LLMs). This framework allows applications to not only depend on calling a language model through an API, but will also:

  • Be data-aware: connect a language model to other sources of data.
  • Be agentic: allow a language model to interact with its environment.

With LangChain, you can chain multiple models from different libraries, like OpenAIā€™s GPT-3 or Hugging Faceā€™s transformers, and connect them to various external data sources. This allows you to create more complex AI applications that can access and utilise a wider range of data sources.

Integrating this new framework is the next big step in the AI revolution.

Use cases LangChain

--

--

Rubentak

Co-Founder of RSLT LAB, Big Data and AI Solutions Graduate, Entrepreneur, and Data Science enthusiast