3-Way AI Chat

A chat application that allows you to chat with three different AI models simultaneously, including GPT-4o, Claude, and Gemini. It's built with Next.js, Shadcn, and Vercel AI SDK. Below is a chart of my usage of the OpenAI from the app. This is a direct code snippet from the app so the data is live.

Overview

I created this app to learn more about how to use the Vercel AI SDK as well as to my own benefit of being able to chat with three different AI models simultaneously. Below is a usage chart taken directly from the app which shows the token usage of the OpenAI model. The data is live and comes directly from the app's database. In this case, I'm using PocketBase to store the data.

Structure

I'm utilizing NextJS for this project with the usual shadcn/ui and Vercel AI SDK. I initially opted for Supabase for the database, but later switched to PocketBase. I chose PocketBase because it's easier to setup, espeically it's self-hosting option, as well as being significantly more lightweight. When self-hosting, I get the added perks of collocation which means faster response times and lower costs. I'm also able to avoid long cold starts when using Vercel by deploying to my VPS using Coolify to handle my CI/CD pipeline.