phoenix icon indicating copy to clipboard operation
phoenix copied to clipboard

[ENHANCEMENT] langchain tracing option to display the raw openai JSON messages.

Open taoari opened this issue 5 months ago • 1 comments

Is your feature request related to a problem? Please describe. A clear and concise description of what the problem is. Ex. I'm always frustrated when [...]

When I enabled tracing for Langchain's ChatOpenAI, the input and output were shown in LangChain's custom JSON format (see screenshot). However, this format is cluttered with unnecessary details, making it hard to follow. What I need is access to the original OpenAI API calls, which are much cleaner and more familiar to developers. Since OpenAI tracing is already supported in Phoenix, having the option to view the raw OpenAI JSON messages would significantly simplify debugging. Moreover, the OpenAI API has become a standard that other frameworks, like vLLM and HuggingFace’s text generation interface, are adopting.

Screenshot 2024-09-05 at 2 49 53 PM

Describe the solution you'd like A clear and concise description of what you want to happen.

This screenshot below is for OpenAI tracing, it's JSON format is much cleaner (simply messages of "role" and "content"). I would expect when I click on ChatOpenAI, it will show cleaner messages like this.

Screenshot 2024-09-05 at 3 12 55 PM

Describe alternatives you've considered A clear and concise description of any alternative solutions or features you've considered.

Additional context Add any other context or screenshots about the feature request here.

taoari avatar Sep 05 '24 22:09 taoari