Skip to content

This chatbot uses Langchain and Google’s Gemini model to provide real-time answers. It features a Streamlit interface for easy user interaction. The chatbot is powered by Langchain's prompt templates and output parsers, with API keys managed via environment variables for security. Input a question, and the chatbot delivers a helpful response.

Notifications You must be signed in to change notification settings

Megha-Chakraborty/AI-Powered-Chatbot

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 Commits
 
 
 
 
 
 

Repository files navigation

Langchain Gemini Chatbot

This project is a chatbot built using Langchain and Google's Gemini model. It leverages Langchain's prompt templates and Google’s powerful AI model to deliver real-time answers through a Streamlit interface.

Features

  • Langchain Integration: The chatbot uses Langchain’s prompt system to generate structured prompts and manage responses via StrOutputParser.
  • Google AI (Gemini): Utilizes the Gemini model from Google AI Studio for generating conversational responses.
  • Streamlit Interface: A simple, user-friendly input box for asking any question and displaying responses.
  • Environment Variable Management: API keys are securely managed using .env files, ensuring security and ease of use.

Prerequisites

  • Python 3.7 or later
  • langchain-google-genai, streamlit, python-dotenv libraries

Installation

  1. Clone the repository:
    git clone https://github.com/your-username/langchain-gemini-chatbot.git
  2. Navigate to the project directory:
    cd langchain-gemini-chatbot
  3. Install the required dependencies:
    pip install -r requirements.txt
  4. Create a .env file in the root directory and add your API keys:
    GOOGLE_API_KEY=your_google_api_key
    LANGCHAIN_API_KEY=your_langchain_api_key

Usage

  1. Run the Streamlit app:
    streamlit run app.py
  2. In the Streamlit interface, type your question in the input field and get a response powered by Google Gemini AI.

Project Structure

📦langchain-gemini-chatbot: The root folder or main directory where my project files are stored. ┣ 📜app.py: The main Python application file that runs my chatbot. ┗ 📜.env: The environment file where sensitive API keys (like Google API and Langchain API keys) are stored securely.

About

This chatbot uses Langchain and Google’s Gemini model to provide real-time answers. It features a Streamlit interface for easy user interaction. The chatbot is powered by Langchain's prompt templates and output parsers, with API keys managed via environment variables for security. Input a question, and the chatbot delivers a helpful response.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages