We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 22bbd4a commit 2623630Copy full SHA for 2623630
tests/lib/chat/test_completions.py
@@ -15,6 +15,7 @@
15
import openai
16
from openai import OpenAI, AsyncOpenAI
17
from openai._utils import assert_signatures_in_sync
18
+from openai._compat import PYDANTIC_V2
19
20
from ._utils import print_obj
21
from ...conftest import base_url
@@ -147,6 +148,9 @@ class ColorDetection(BaseModel):
147
148
color: Color
149
hex_color_code: str = Field(description="The hex color code of the detected color")
150
151
+ if not PYDANTIC_V2:
152
+ ColorDetection.update_forward_refs(**locals()) # type: ignore
153
+
154
completion = _make_snapshot_request(
155
lambda c: c.beta.chat.completions.parse(
156
model="gpt-4o-2024-08-06",
0 commit comments