Images
Add images to trace logs.
If you use vision models or interact with images in your application, you can add them to your trace logs and see the rendered images on the platform.
Models like gpt-4-turbo
or the Claude 3 models that take image (URLs) as inputs are automatically traced.
You can add generated images, such as those generated using DALL-E, to your traces using the trace_insert
method.
TraceLogImage
Trace Logs have a images
field that accepts a list of TraceLogImage
objects.
Parameters
url
: The URL of the image to be attached to the trace. Note that image URLs from model providers like DALL-E expire after a short period of time. If the URL expires, the image will no longer be visible in the UI.caption
: An optional caption for the image. This can be used to help identify where in the trace the image was generated or any other relevant information.
Getting Started
Visualisation
On the detailed trace logs page, you will see the images rendered in the Inputs/Outputs and Messages tabs.
Inputs/Outputs
Messages
To keep the messages legible, the images are displayed below the actual message and are replaced in the message display by e.g. [PLACEHOLDER FOR IMAGE - SEE image-1 MESSAGE]
.