When using the openai client with the client.beta.chat.completions.parse, outputs are not logged to the platform
Reproduction steps
from opik.integrations.openai import opik_tracker
from openai import OpenAI
from pydantic import BaseModel
client = opik_tracker.track_openai(OpenAI())
class CalendarEvent(BaseModel):
name: str
date: str
participants: list[str]
completion = client.beta.chat.completions.parse(
model="gpt-4o-2024-08-06",
messages=[
{"role": "system", "content": "Extract the event information."},
{"role": "user", "content": "Alice and Bob are going to a science fair on Friday."},
],
response_format=CalendarEvent,
)
What component(s) are affected?
Opik version
Describe the problem
When using the openai client with the
client.beta.chat.completions.parse
, outputs are not logged to the platformReproduction steps
from opik.integrations.openai import opik_tracker from openai import OpenAI from pydantic import BaseModel
client = opik_tracker.track_openai(OpenAI())
class CalendarEvent(BaseModel): name: str date: str participants: list[str]
completion = client.beta.chat.completions.parse( model="gpt-4o-2024-08-06", messages=[ {"role": "system", "content": "Extract the event information."}, {"role": "user", "content": "Alice and Bob are going to a science fair on Friday."}, ], response_format=CalendarEvent, )
print(completion)