Skip to content

SAMRAT47/Generative-AI-ChatBot-using-Langchain

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

43 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Multi-Provider AI Chatbot with Langchain in Streamlit UI

Created by Samrat Roychoudhury


Overview

The Multi-Provider AI Chatbot is a unified conversational platform built using Streamlit, designed to interact with multiple large language model (LLM) providers through a single elegant interface. It supports OpenAI, Google Gemini, Groq, and Ollama, allowing users to seamlessly switch between models and experiment with various generation parameters.

The chatbot features a clean, modern UI, dynamic model selection, real-time response streaming, and exportable chat sessions — making it ideal for both demonstration and professional deployment.


Key Features

Multi-Model Integration

  • Connects to major AI providers: OpenAI, Google Gemini, Groq, and Ollama.
  • Dynamically loads models without restarting the app.
  • Automatically detects API key availability and configuration.

Professional User Interface

  • Streamlit-based UI with custom embedded CSS.
  • Gradient background with transparency and modern visual design.
  • Sidebar with glassmorphism effect and adaptive theme styling.

Real-Time Interaction

  • Streamed model responses for natural conversation flow.
  • Adjustable temperature and max token settings.
  • Persistent chat history with easy export and clearing options.

Modular Design

  • Dynamically imports and initializes providers.
  • Environment-based configuration for secure key management.
  • Easily extendable for future LLM integrations.

Technology Stack

Framework: Streamlit Language: Python AI Providers: OpenAI, Google Gemini, Groq, Ollama Core Libraries: LangChain, dotenv, Streamlit Components Styling: Custom CSS and embedded HTML


Usage Guide

  1. Launch the chatbot interface.
  2. Select your preferred AI Provider and Model from the sidebar.
  3. Adjust the Temperature and Max Tokens parameters as desired.
  4. Type your message and receive real-time responses.
  5. Export or clear conversations directly from the sidebar.

Screenshots

You can attach screenshots in this section after deployment to visually showcase the interface.

Section Description
Main Interface Displays the chat layout with user and AI messages.
Sidebar Panel Contains provider, model, and parameter configuration.
Chat Clear and Export View Demonstrates chat history management.

Screenshots

🖥️ Main Interface

Main Interface
Clean, centered chat interface showing user and AI messages.


🎛️ Sidebar Panel

Sidebar Panel
Interactive sidebar with provider selection, model options, and configuration controls.


💬 Chat Management

Chat Management
Chat export and history management section with clear layout and metrics.


Live Application

Once deployed, include your application URL below:

Application URL: https://generative-ai-chatbot-using-langchain-by-samrat.streamlit.app/


Future Enhancements

  • Integration with additional AI providers (e.g., Anthropic, Perplexity).
  • User authentication and session persistence.
  • Context-aware memory and conversation continuity.
  • Optional speech input and text-to-speech output.

Author

Samrat Roychoudhury Machine Learning & AI Developer

LinkedIn: https://www.linkedin.com/in/samrat-roychoudhury/

Email: [email protected]


About

This repository contains all files and codes of my Generative AI ChatBot using Langchain project.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages