How to Start with Helicone: A Comprehensive Guide

Apr 20, 2024 | Data Science

Helicone is an all-in-one open-source platform designed for LLM developers. In this guide, we will walk you through setting up Helicone, showcase its key features, and troubleshoot common issues. Let’s get started!

Quick Start with Helicone

To begin your journey with Helicone, follow these simple steps:

  1. Get Your API Key: Sign up here to obtain your write-only API key.
  2. Code Setup: Update the baseURL in your code with the following TypeScript example:
  3. import OpenAI from 'openai';
    const openai = new OpenAI({
      apiKey: process.env.OPENAI_API_KEY,
      baseURL: 'https://oai.helicone.ai/v1/$process.env.HELICONE_API_KEY',
    });
  4. Secure Alternative: For more secure environments, you can also use headers:
  5. import OpenAI from 'openai';
    const openai = new OpenAI({
      apiKey: process.env.OPENAI_API_KEY,
      baseURL: 'https://oai.helicone.ai/v1',
      defaultHeaders: {
        'Helicone-Auth': `Bearer $process.env.HELICONE_API_KEY`,
      },
    });
  6. Access Logs: Once set up, view your logs at Helicone.

Key Features of Helicone

  • Integrate: Log all your requests to various providers like OpenAI, Anthropic, and more with just one line of code.
  • Observe: Inspect and debug sessions for agents, chatbots, and more.
  • Analyze: Track and export metrics like cost, latency, and quality for better insights.
  • Fine-tune: Fine-tune with partners like OpenPipe.
  • Prompt Management: Maintain control over your prompts for easy access and experimentation.

Understanding Helicone’s Architecture

Imagine Helicone as a multi-storey building where each floor has a specific function:

  • Web: The frontend of the building where users interact (NextJS).
  • Worker: The delivery service ensuring your requests are processed (Cloudflare Workers).
  • Jawn: The storage room that collects logs (Express + Tsoa).
  • Supabase: The database managing all essential records.
  • ClickHouse: The analytical department ensuring everything runs smoothly, analyzing data efficiently.
  • Minio: The secure storage for your logs, keeping everything safe.

Troubleshooting Common Issues

If you encounter anything unexpected while using Helicone, here are some troubleshooting tips:

  • API Key Issues: Ensure that your API key is valid and correctly integrated into your environment variables.
  • Connection Problems: Verify your internet connection and try running the setup in a more stable environment.
  • Logs Not Showing: Double-check that you’ve correctly configured the logging in your setup code.
  • Integration Failed: Make sure you’ve installed the right dependencies and that your integration code matches the required format.

For more insights, updates, or to collaborate on AI development projects, stay connected with fxis.ai.

Conclusion

At fxis.ai, we believe that such advancements are crucial for the future of AI, as they enable more comprehensive and effective solutions. Our team is continually exploring new methodologies to push the envelope in artificial intelligence, ensuring that our clients benefit from the latest technological innovations.

Stay Informed with the Newest F(x) Insights and Blogs

Tech News and Blog Highlights, Straight to Your Inbox