At Helicone we believe that open-source software makes the world a better place. We are committed to open-source and we made a guide to make it easy for you to deploy your own instance of Helicone.

Running locally

# Clone repository
git clone https://github.com/Helicone/helicone.git --depth 1
cd helicone/docker

# Copy environment variables
# See below for details: https://supabase.com/docs/guides/self-hosting/docker
cp .env.example .env

# Startup service
docker compose up
  • To create a user go to http://localhost:54323/project/default/auth/users and add your account. You can use this account to sign into Helicone at localhost:3000 via your browser.
  • Also update ENABLE_EMAIL_AUTOCONFIRM to true in ./docker/.env to allow user addition without confirmation.

Default URLs:

  • Helicone Webpage: localhost:3000
  • Helicone Worker: localhost:8787 (See known issues below)

KNOWN ISSUES

The worker container is not very stable. For now we recommend using the proxy built into JAWN, some features are not implemented in the JAWN proxy yet like cache and rate limiting. Basic logging and prompts do work.

Example

from openai import OpenAI
import os
from dotenv import load_dotenv

# Load environment variables from .env file
load_dotenv()

openai_client = OpenAI(
    api_key=os.getenv("OPENAI_API_KEY"),
    base_url="http://127.0.0.1:8585/v1/gateway/oai/v1",
    default_headers={
        "Helicone-Auth": f"Bearer {os.getenv('HELICONE_API_KEY')}",
    }
)

response = openai_client.completions.create(
    model="gpt-3.5-turbo-instruct",
    prompt="Count to 5",
    stream=False,
)
assert response.choices[0].text is not None

Maintaining your instance

Helicone container builds

docker build --platform linux/amd64 -t helicone/supabase-migration-runner -f dockerfiles/dockerfile_migration_runner .
docker build -t helicone/worker -f dockerfiles/dockerfile_worker .
docker build -t helicone/web -f dockerfiles/dockerfile_web .
docker build -t helicone/clickhouse-migration-runner -f dockerfiles/dockerfile_clickhouse_migration_runner . --no-cache

Background

This folder is forked from supabase’s docker

Here is a helpful guide for getting started: here