Skip to content

Latest commit

 

History

History
11 lines (7 loc) · 594 Bytes

File metadata and controls

11 lines (7 loc) · 594 Bytes

NextJs, Vercel AI SDK, and Langfuse Example

This example repo demostrates how to use Langfuse to instrument a NextJs app with the Vercel AI SDK. This repo is based on the next-openai example.

Relevant Files:

  • next.config.js - Enable experimental.instrumentationHook
  • instrumentation.ts - Register the LangfuseExporter
  • app/routes/api/* - Enable experimental_telemetry in AI SDK routes

See the integration docs for more information and a step-by-step guide: https://langfuse.com/docs/integrations/vercel-ai-sdk