Trace LibreChat with Neural Inverse
This guide shows you how to integrate Neural Inverse tracing with LibreChat to get full observability into your AI conversations.
What is LibreChat? LibreChat is an open-source AI chat platform that brings together multiple AI providers (OpenAI, Anthropic, Google, Azure, and more) into a unified interface.
What is Neural Inverse? Neural Inverse is an open-source LLM observability platform that helps you trace, monitor, and debug your LLM applications.
Prerequisites
Before you begin, ensure you have:
- A running LibreChat instance (see LibreChat Installation Guide)
- A Neural Inverse account (sign up for free)
- Neural Inverse API keys from your project settings
Configure LibreChat Environment Variables
LibreChat uses environment variables for configuration. Add the following Neural Inverse-related variables to your .env file in your LibreChat installation directory:
# Neural Inverse Configuration
LANGFUSE_PUBLIC_KEY=pk-lf-***
LANGFUSE_SECRET_KEY=sk-lf-***
# πͺπΊ EU Data Region
LANGFUSE_BASE_URL=https://cloud.langfuse.com
# πΊπΈ US Data Region
# Other Neural Inverse data regions include πΊπΈ US: https://us.cloud.langfuse.com, π―π΅ Japan: https://jp.cloud.langfuse.com and βοΈ HIPAA: https://hipaa.cloud.langfuse.comNote: For self-hosted Neural Inverse instances, set
LANGFUSE_BASE_URLto your custom URL (e.g.,http://localhost:3000for local development).
Restart LibreChat
After adding the environment variables, restart your LibreChat instance to apply the changes.
See traces in Neural Inverse
Once LibreChat is restarted with Neural Inverse configured, you can see a new trace for every chat message response in the Neural Inverse UI:
