Automatically monitor GPT API calls with seamless integration
openai
package installedOpenAIAgentMonitor
class for automatic GPT monitoring:
chat.completions.create
will be monitored automatically.
agent_response
event.
Events not appearing in dashboard
apiKey
and organizationId
are correct. For scripts that exit quickly, you may need to call await monitor.shutdown()
to ensure the final batch of events is sent.Session tracking is not working
wrapOpenAI
. The OpenAI SDK does not have a built-in concept of a session, so you must provide it to the wrapper.Function calls are not being tracked
tool_calls
object. Verify that your prompt is successfully inducing the model to use your defined tools.User messages are not detected correctly
messages
array with role: 'user'
. Ensure your conversation history is structured correctly.