Skip to content

Commit

Permalink
Fix failing tests
Browse files Browse the repository at this point in the history
  • Loading branch information
jverre committed Nov 23, 2024
1 parent 273cfac commit 7d06afa
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 2 deletions.
6 changes: 5 additions & 1 deletion sdks/python/examples/openai_integration_example.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@

client = opik_tracker.track_openai(client)


@track()
def f_with_structured_output_openai_call():
class CalendarEvent(BaseModel):
Expand All @@ -21,7 +22,10 @@ class CalendarEvent(BaseModel):
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."},
{
"role": "user",
"content": "Alice and Bob are going to a science fair on Friday.",
},
],
response_format=CalendarEvent,
)
Expand Down
3 changes: 2 additions & 1 deletion sdks/python/tests/library_integration/openai/test_openai.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
import os
import asyncio
from pydantic import BaseModel
from typing import List

import opik
from opik.integrations.openai import track_openai
Expand Down Expand Up @@ -511,7 +512,7 @@ def test_openai_client_beta_chat_completions_parse__happyflow(
class CalendarEvent(BaseModel):
name: str
date: str
participants: list[str]
participants: List[str]

messages = [
{"role": "system", "content": "Extract the event information."},
Expand Down

0 comments on commit 7d06afa

Please sign in to comment.