Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Bug]: OpenAI structured output calls are not tracked #706

Closed
4 tasks
jverre opened this issue Nov 23, 2024 · 0 comments · Fixed by #707
Closed
4 tasks

[Bug]: OpenAI structured output calls are not tracked #706

jverre opened this issue Nov 23, 2024 · 0 comments · Fixed by #707
Labels
bug Something isn't working

Comments

@jverre
Copy link
Collaborator

jverre commented Nov 23, 2024

What component(s) are affected?

  • Python SDK
  • Opik UI
  • Opik Server
  • Documentation

Opik version

  • Opik version: latest

Describe the problem

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)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant