Skip to content

A Chainlit chat app that supports multiple profiles with various chat providers including ChatGPT, Claude and Gemini

Notifications You must be signed in to change notification settings

mungana-ai/homeai

Repository files navigation

Home AI

  • This demo illustrates how to use Chainlit to build chatbots with LLMs the big three AI providers: OpenAI, Anthropic, and Gemini.

Features

  • Multiple user profiles
  • Integration with OpenAI, Anthropic and Gemini chat providers
  • Chat settings
  • Authentication
  • Custom logo and favicon
  • Custom theme

Installation

  1. Clone the repository:

    git clone https://github.com/mungana-ai/homeai.git
    cd homeai
  2. Create a virtual environment:

    python -m venv venv         # We assume you are using at least Python 3.10
    source venv/bin/activate    # For Unix-based systems
    venv\Scripts\activate.bat   # For Windows
  3. Install the package and its dependencies:

    pip install -r requirements.txt

Configuration

  1. Rename the provided .env.example file into .env in the project root directory.

  2. Update the necessary configuration variables to the .env file. The following variables are required:

    DEFAULT_USER_PASSWORD=your_default_user_password
    CHAINLIT_AUTH_SECRET=your_64_char_chainlit_auth_secret_for_signing_tokens
    LITERAL_API_KEY=your_literal_api_key_for_storing_chat_history
    
    # Optional: At least one of the following chat providers is required
    OPENAI_API_KEY=your_openai_api_key
    ANTHROPIC_API_KEY=your_anthropic_api_key
    GOOGLE_API_KEY=your_google_api_key
    
    # Optional
    DEFAULT_USERNAME=your_default_username  # Default: "admin"

    Hints: You can generate a 64-character secret key using the following command: chainlit create-secret. To obtain an API key for Literal, sign up for an account and create a new project.

Usage

To run the Chainlit app, use the following command:

chainlit run app.py --host 0.0.0.0 --port 5500
  • You app should now be accessible at http://localhost:5500

Project Structure

The project structure is organized as follows:

  • src/: Contains the main application code.
  • .chainlit/: Contains the Chainlit configuration files.
  • public/: Contains the static files for custom logos and favicons.
  • app.py: The main application entry point.
  • .env.example: Stores the environment variables template.
  • requirements.txt: Lists the project dependencies.
  • chainlit.md: Provides documentation and instructions for the project.

Issues

  • Bugs and issues can be reported on the GitHub Issues page.
  • If you have any further questions or inquiries, feel free to contact us.

License

This project is licensed under the MIT License. You are free to use, modify, and distribute the code as you see fit.

Contributions

Contributions are welcome! If you would like to contribute to the project, please fork the repository and submit a pull request.

Links

About

A Chainlit chat app that supports multiple profiles with various chat providers including ChatGPT, Claude and Gemini

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published