You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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,
)
print(completion)
The text was updated successfully, but these errors were encountered:
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)
The text was updated successfully, but these errors were encountered: