PersonalityChatbot logo

PersonalityChatbot

Free

Langchain chatbot for chat with personality using Langchain🦜 | LangSmith | MongoDB. ![GitHub Repo stars](https://img.shields.io/github/stars/btrcm00/chatbot-with-langchain?style=social)

FreeFree tier
Inputs: textOutputs: text
Type
Open Source

About PersonalityChatbot

A chatbot implementation using the Langchain framework, featuring a customizable personality (gender, age, etc.) and conversation history stored in MongoDB. It uses LangSmith for prompt versioning and tracing, and Presidio for PII anonymization. The application is deployed as a microservices architecture with a Next.js frontend, FastAPI backend, and supports OpenAI or Vertex AI as the LLM provider. Containerized with Docker Compose for easy deployment.

Key Features

Customizable bot personality (gender, age, etc.)
Conversation memory stored in MongoDB
LLM support for OpenAI and Vertex AI
Prompt versioning and tracing with LangSmith
PII anonymization using Presidio
Next.js frontend with FastAPI backend
Containerized deployment with Docker Compose
Unique conversation ID per user session

Pros & Cons

Pros
  • Open source and free to use
  • Highly customizable bot personality and memory
  • Includes PII protection for sensitive data
  • Modular microservices architecture for scalability
  • Supports multiple LLM providers (OpenAI and Vertex AI)
  • Comprehensive tracing and monitoring with LangSmith
Cons
  • Requires Docker and Docker Compose knowledge for deployment
  • Limited to OpenAI and Vertex AI LLM providers
  • No hosted or managed version; self-hosted only
  • Initial setup and configuration may be complex for beginners

Best For

Building chatbots with specific personas for customer serviceCreating conversational AI with persistent memory across sessionsPrototyping and testing Langchain-based chatbots locallyEducational projects exploring LLM integration and prompt engineering

FAQ

What LLM providers are supported?
The chatbot supports OpenAI and Vertex AI as the base LLM.
How is conversation history stored?
Conversation history is stored in MongoDB, with each user session having a unique conversation ID.
Does it handle PII (personally identifiable information)?
Yes, the backend uses the Presidio Anonymizer to optionally anonymize PII data before sending it to the LLM, and de-anonymizes the response.
What frontend and backend frameworks are used?
The frontend is built with Next.js (port 3000) and the backend uses FastAPI (port 8080).
Is the application containerized?
Yes, the application uses Docker Compose to manage the microservices: Next.js frontend, FastAPI backend, and MongoDB database.