mirror of
https://github.com/hanzoai/insights-js.git
synced 2026-10-30 18:34:19 +00:00
* docs: add AI provider examples for all LLM analytics integrations Add 20 new example directories covering every provider documented in our LLM analytics onboarding docs. This includes OpenAI-compatible providers (Groq, DeepSeek, Mistral, xAI, Together AI, Ollama, Cohere, Hugging Face, Perplexity, Cerebras, Fireworks AI, OpenRouter, Helicone, Vercel AI Gateway, Azure OpenAI, Portkey) and custom integrations (Instructor, LangGraph, AWS Bedrock, Convex). * fix: use max_tokens instead of max_completion_tokens for Mistral example Mistral's API doesn't support max_completion_tokens, causing 422 errors. * fix: import AzureOpenAI from @posthog/ai, not @posthog/ai/openai * fix: use Resource constructor instead of resourceFromAttributes for OTel v1 * style: format all AI examples with prettier
301 B
301 B
Helicone + PostHog AI Examples
Track Helicone API calls with PostHog via the OpenAI-compatible API.
Setup
pnpm install
cp .env.example .env
# Fill in your API keys in .env
Examples
- chat.ts - Chat completions via Helicone
Run
source .env
npx tsx chat.ts