Skip to content

ZayedShahcode/OneAI-Backend

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

14 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Flask LangChain Chatbot

A web-based AI chatbot application built with Flask and the LangChain framework. This application provides a conversational interface where users can interact with an AI assistant through a clean and responsive web interface.

Features

  • Interactive chat interface
  • Support for multiple language models
  • Customizable chatbot behavior
  • API endpoints for integration with other applications
  • Session management for multiple users
  • Markdown rendering in responses

Demo

Chatbot Demo

Table of Contents

Installation

Prerequisites

  • Python 3.8 or higher
  • pip (Python package installer)
  • API key for your chosen language model (OpenAI, Anthropic, etc.)

Setup

  1. Clone the repository:

    git clone https://github.com/yourusername/flask-langchain-chatbot.git
    cd flask-langchain-chatbot
  2. Create and activate a virtual environment:

    python -m venv venv
    source venv/bin/activate  # On Windows: venv\Scripts\activate
  3. Install dependencies:

    pip install -r requirements.txt

Configuration

The application can be configured through the .env file:

# API Keys
LLM_API_KEY=your_api_key_here
LLM_PROVIDER=openai  # Options: openai, anthropic, etc.

Usage

  1. Start the application:

    python app.py

    Or for development mode:

    flask run --debug
  2. Start chatting with the AI assistant through the web interface

Contributing

  1. Fork the repository
  2. Create a feature branch: git checkout -b feature-name
  3. Commit your changes: git commit -m 'Add some feature'
  4. Push to the branch: git push origin feature-name
  5. Submit a pull request

License

This project is licensed under the MIT License - see the LICENSE file for details.

About

A Flask based backend application for my AI powered chatbot

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published