In this post, you are going to learn how we can create this chatbot in LangGraph, Gemini Pro or any model you like, Custom Function and Streamlit that can respond to user's support requests
LangGraph is a library for building stateful “ multi-actor applications “ with LLM. LangChain Expression Language can be extended to allow multiple chains (or actors) to work together cyclically over multiple steps.One of the great values of “LangChain” is that you can easily create custom chains.
We have provided LangChain Expression Language as a function for this purpose, but there was no easy way to introduce the cycle. LangGraph makes it easy to introduce cycles into LLM applications.
LangChain Expression Language is not suitable for describing cycles (loops), but by using LangGraph, it becomes possible to describe and introduce the cycles necessary for the agent.
If you like this topic and you want to support me:
Clap my article 50 times; that will really help me out.👏
Follow me on Medium and subscribe to get my latest article🫶
if you are not a medium member and you would like unlimited articles to the platform. Consider using my referral link right here to sign up — it’s less than the price of a fancy coffee, only $5 a month! Dive in, the knowledge is fine!
Before we dive into our application, we will create an ideal environment for the code to work. For this, we need to install the necessary Python libraries needed. Firstly, we will start by installing the libraries that support the model. For this, we will do a pip install of the below libraries.
pip install streamlit
pip install langchainhub
pip install langgraph
pip install langchain_google_genai
pip install -U langchain-openai langchain
Once installed we import Langchain, Langchain Google, langchain community, os, typing, langchain core, operator, langchian prebuilt, langGraph and streamlit
from langchain import hub
from langchain.agents import Tool, create_react_agent