Skip to content

Repository files navigation

LLM Picker: Multi-Provider AI Chat Interface

Overview

LLM Picker is a flexible, multi-provider chat interface that allows users to interact with various Large Language Models (LLMs) from different providers such as OpenAI, Anthropic, Google Gemini, AWS Bedrock, Groq, and more.

LLM Picker Screenshot Streamlit UI Screenshot

Features

  • 🌐 Multi-Provider Support
    • Connect to LLMs from OpenAI, Anthropic, Gemini, AWS, Groq, and more
  • 🔄 Dynamic Model Selection
    • Easily switch between different models within a provider
  • 💬 Persistent Chat Memory
    • Maintains context across conversations
  • 🚀 Lightweight and Fast
    • Built with Flask (Python) and Alpine.js
  • 🎨 Customizable UI
    • Can choose between the standalone Streamlit UI or a client-server based Flask app and UI

Prerequisites

Before you begin, ensure you have the following installed:

  • Python 3.12+
  • pip
  • API keys for desired LLM providers

Installation

1. Clone the Repository

git clone https://github.com/rachedblili/LLMPicker
cd LLMPicker

2. Set Up Python Environment

python3 -m venv venv
source venv/bin/activate
pip install -r requirements.txt

3. Configure API Keys

Create a file named .env in the project directory and add your API keys for each LLM provider. For example:

OPENAI_API_KEY="your_key"
SAMBANOVA_API_KEY="your_key"
GEMINI_API_KEY="your_key"
GROQ_API_KEY="your_key"
ANTHROPIC_API_KEY="your_key"
AWS_ACCESS_KEY="your_key"
AWS_ACCESS_SECRET="your_secret"
DEEPSEEK_API_KEY="your_key"
QWEN_API_KEY="your_key"

4. Configure Available LLM Providers

Modify config/llm_models.yaml to add or remove LLM providers and models. It's important to make sure that only providers for which you have API keys are included.

5. Run the Application

There are two ways to use LLM Picker: Standalone or as a Flask app.

Standalone

Simply run the streamlit UI using streamlit run streamlit_ui.py

A browser window should open up and you can just get started.

Flask

Set up the front-end

Modify the config/frontend-config.js file to match your backend server URL.

// config/frontend-config.js
const BACKEND_CONFIG = {
    BASE_URL: 'http://localhost:5555' // Replace with your backend server URL
};
Start the backend server
python server.py

Troubleshooting

  • Ensure all API keys are correctly configured in the .env file.
  • Check your backend server URL in config/frontend-config.js.
  • If you're running on a server, make sure to add your IP address to the allowed_ips list in server.py.
  • Check your python version, dependencies, and environment settings.
  • If you run into problems, feel free to report an issue above or contact me directly through GitHub.

Contributing:

  • Fork the repository
  • Create a feature branch (git checkout -b feature/my-feature)
  • Commit your changes (git commit -am 'Add some feature')
  • Push to the branch (git push origin feature/my-feature)
  • Create a pull request

License:

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

Author:

Acknowledgments:

About

My own little chat front-end to the variety of LLM tools to which I have access.

Resources

Stars

Watchers

Forks

Releases

Packages

Used by

Contributors

Languages