Welcome to REST Chat, an open-source, research-focused chat application that allows users to integrate their own API keys to interact with state-of-the-art AI models. Released under Rihone AI Labs, for quick prototyping and experimentation with AI Chat applications.
- Integration with top 5 AI model providers, inlcuding:
- [ x ] OpenAI / Azure OpenAI
- [ x ] Anthropic
- [ x ] Google AI
- [ ] AWS Bedrock
- [ ] Huggingface
- Support multiple chat profiles including
- [ x ] LLM Chat
- [ x ] Text to Image
- Multimodal Chat (
WIP
) - Voice Chat (
WIP
) - [Experimental] Text to Media - Music or Video (
WIP
)
- Chainlit Chat settings
- Chainlit Authentication
- Chainlit Custom logo and favicon
- Chainlit Custom theme
-
Clone the repository:
git clone https://github.com/rihoneailabs/restchat.git cd restchat
-
Create a python virtual environment:
python -m venv venv # We assume you are using at least Python 3.11 source venv/bin/activate # For Unix-based systems i.e. MacOS, Ubuntu etc. venv\Scripts\activate.bat # For Windows
-
Install python dependencies:
pip install -r requirements.txt pip install -U --prefer-binary tokenizers anthropic # Tip: If you have poetry installed, use it instead: # poetry install
Hint: If you encounter an error when installing
tokenizers
which is a sub-depenency of theanthropic
package, you will need to explictly tellpip
to install a pre-build binary instead of building from source:pip install -U --prefer-binary tokenizers anthropic
-
Rename the provided
.env.example
file into.env
in the project root directory. -
Modify the
.env
file by setting the required configuration variables as follows:CHAINLIT_AUTH_SECRET=your_64_char_secret_for_signing_auth_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" DEFAULT_USER_PASSWORD=your_default_user_password # Recommended: OAuth settings (see https://docs.chainlit.io/authentication/oauth) OAUTH_GOOGLE_CLIENT_ID=your_google_client_id OAUTH_GOOGLE_CLIENT_SECRET=your_google_client_secret
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.
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
The project structure is organized as follows:
.chainlit/
: Contains the Chainlit configuration files.restchat/
: Contains the core application code.public/
: Contains the static files for custom logos and favicons.app.py
: The main application entry point.requirements.txt
: Lists the project dependencies..env.example
: Stores the environment variables template.
- Bugs and issues can be reported on the GitHub Issues page.
This project is licensed under the Apache 2.0 License. See License for more details.
We welcome contributions from the community to help improve REST Chat! Here’s how you can contribute:
- Fork the repository.
- Create a feature branch:
git checkout -b feature/new-feature
. - Commit your changes:
git commit -m 'Add some feature'
. - Push to the branch:
git push origin feature/new-feature
. - Open a pull request.
This is an early-stage research version. Here’s what we plan to explore in future versions:
- Azure Click to Deploy
- AWS Click to Deploy
- Multimodal Chat (
WIP
) - Voice Chat (
WIP
) - vLLM intergration
- [Experimental] Text to Media - Music or Video (
WIP
) - Multi-lingual support
Special thanks to everyone who contributes to REST Chat and helps push forward research and experimentation in accesible chat applications.