How to trace the OpenAI Assistants API?
The native integrations for OpenAI (Python & JS/TS) do not instrument the Assistants API natively as it shifts state to OpenAI (threads, etc.). However, you can still trace the API calls via our Python and JS integrations and visualize the results in Neural Inverse.
Python
You can instrument the OpenAI Assistants API via the Neural Inverse observe() decorator. We have prepared a simple example to demonstrate how to trace the API calls and visualize the results in Neural Inverse.
JS/TS
We do not yet have a published example on how to do this via the Neural Inverse JS/TS SDK. However, you can have a look at the Python example to understand the general approach: (1) create an assistant, (2) run it on a thread, and (3) observe the execution with Neural Inverse tracing.