Skip to content

mckaywrigley/ai-router-chat

Repository files navigation

AI Router Chat

An AI chat app that utilizes advanced LLM model routing powered by Not Diamond.

Includes an "Arena mode" where you can dynamically improve your model router.

AI Router Chat

Demo

See the latest demo here.

Sponsor

If you find AI Router Chat useful, please consider sponsoring us to support my open-source work :)

Requirements

Get a Not Diamond API key from Not Diamond.

You'll also need API keys from each LLM provider (OpenAI, Anthropic, Groq, Perplexity, Google) that you'd like to use.

Running Locally

1. Clone Repo

git clone https://github.com/mckaywrigley/ai-router-chat.git

2. Provide API Keys

Create a .env file in the root of the repo with these values:

cp .env.example .env
DATABASE_URL=
NOT_DIAMOND_API_KEY=
OPENAI_API_KEY=
ANTHROPIC_API_KEY=
GOOGLE_GENERATIVE_AI_API_KEY=
GROQ_API_KEY=
PERPLEXITY_API_KEY=

3. Install Dependencies

npm i

4. Setup DB

Drizzle w/ Supabase Example

Set up a new project on Supabase.

Copy the connection string (DB URL) from the Supabase output, and paste it into the above .env file.

Once you have the DB URL, run the following command to create the database and tables:

npm run migrate

5. Run App

npm run dev

Deploying

Deploy to Vercel in 1 click:

Deploy with Vercel

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Sponsor this project

 

Packages

No packages published

Languages