Skip to content

Commit 80d670e

Browse files
Copilotjohanste
andcommitted
Fix ChatCompletion imports to use openai.types.chat instead of openai.resources.chat.completions
Co-authored-by: johanste <15110018+johanste@users.noreply.github.com>
1 parent 91a2bde commit 80d670e

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

instrumentation-genai/opentelemetry-instrumentation-openai-v2/tests/test_async_chat_completions.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@
1717

1818
import pytest
1919
from openai import APIConnectionError, AsyncOpenAI, NotFoundError
20-
from openai.resources.chat.completions import ChatCompletion
20+
from openai.types.chat import ChatCompletion
2121

2222
from opentelemetry.sdk.trace import ReadableSpan
2323
from opentelemetry.semconv._incubating.attributes import (

instrumentation-genai/opentelemetry-instrumentation-openai-v2/tests/test_chat_completions.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@
1717

1818
import pytest
1919
from openai import APIConnectionError, NotFoundError, OpenAI
20-
from openai.resources.chat.completions import ChatCompletion
20+
from openai.types.chat import ChatCompletion
2121

2222
from opentelemetry.sdk.trace import ReadableSpan
2323
from opentelemetry.semconv._incubating.attributes import (

0 commit comments

Comments
 (0)