mirror of
https://github.com/hanzoai/insights-js.git
synced 2026-11-03 00:53:53 +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
385 B
385 B
AWS Bedrock + PostHog AI Examples
Track AWS Bedrock LLM calls with PostHog via OpenTelemetry instrumentation.
Setup
pnpm install
cp .env.example .env
# Fill in your API keys in .env
# Ensure your AWS credentials are configured
Examples
- chat.ts - Bedrock Converse API with OpenTelemetry tracing to PostHog
Run
source .env
npx tsx chat.ts