Skip to content

Sindri-Labs/vercel-ai-chatbot

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

7 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Vercel AI Chatbot

This is a clone of Vercel's AI Chatbot at commit 7d8e713.

Running locally

Requirements

1. Clone the Repo

In a terminal,

git clone https://github.com/Sindri-Labs/vercel-ai-chatbot.git
cd vercel-ai-chatbot

2. Run (with Sindri and evllmp)

Modify the below command to include your Sindri API Key in place of YOUR_SINDRI_API_KEY then run it in the terminal (building may take several minutes)

OPENAI_API_KEY=YOUR_SINDRI_API_KEY docker compose up --build

You will know it is ready when you see logs similar to

vercel-ai-chatbot-frontend-1  |  ✓ Starting...
vercel-ai-chatbot-frontend-1  |  ✓ Ready in 542ms

3. Visit the Site and Start Chatting!

Visit http://localhost:3000 and start chatting as a guest user. Chat history will not be saved between sessions.

Notes:

  • All chats are automatically encrypted with Sindri's Trusted Execution Environment (TEE)! The console logs for the evllmp container show encrypted/decrypted chats.
  • Sindri is still in development. File uploads and web searches are still in development and currently do not work.

4 (Optional). Create an Account and Log in to Save your Chat History

Visit http://localhost:3000/register and create an account.

You can also visit the Account menu in the bottom of the left sidebar. Here you can create accounts and log into existing accounts.

5. Stop

To bring it all down, run:

docker compose down

You can bring it up again with docker compose up. This will skip the building phase and existing accounts and their chat histories will be restored.

Other

Environment Variables

Variable Description Default
AUTH_SECRET JWT encryption secret Required (create with openssl rand -base64 32)
BLOB_READ_WRITE_TOKEN Vercel Blob Storage key Required
MAX_COMPLETION_TOKENS Maximum tokens for responses 1000
OPENAI_API_KEY Your OpenAI API key Required
OPENAI_BASE_URL Custom OpenAI-compatible endpoint https://api.openai.com/v1
OPENAI_MODEL Model to use for chat completions gpt-4o-mini
PORT Port the server is exposed 3000
SINDRI_BASE_URL Sindri OpenAI-compatible endpoint https://sindri.app/api/ai/v1/openai
USE_TOOLS Enable AI tools (weather, documents, etc.) false

Key Modifications

  • Docker Deployment: Complete containerized setup with PostgreSQL and Redis
  • OpenAI Integration: Switched from xAI to OpenAI with configurable base URL
  • PDF Support: Added PDF and JSON file upload support (up to 100MB)
  • Authentication: Fixed auth flow and added guest mode
  • Environment Variables: All configuration via Docker environment variables
  • This Vercel version still uses the OpenAI /v1/chat/completions instead of the newer /v1/responses endpoint. Sindri does not yet support /v1/responses.

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors