With our OpenAI integration, you have the ability to seamlessly monitor all OpenAI queries. By adding just two lines of code, your team can gain access to key performance metrics such as cost, response time, rate limits, error rates, chat history, and sample inputs and outputs. Our OpenAI integration provides real-time metrics to help businesses optimize usage, reduce costs, and achieve better results.
重要
To instrument your OpenAI-powered app, we recommend using AI monitoring rather than this older installation method. See our docs to get started.
This guide will show you how to integrate your OpenAI applications so you can start monitoring your data.
Install OpenAI with pip
After you've completed your OpenAI import, run:
bash
$
pip install nr-openai-observability
Set your environment variable
Get your and set it as environment variable: NEW_RELIC_LICENSE_KEY.