Skip to content

Commit 1dacf8d

Browse files
committed
adjust unwrap + add pydantic to test reqs
1 parent 2549f25 commit 1dacf8d

File tree

2 files changed

+4
-1
lines changed

2 files changed

+4
-1
lines changed

instrumentation/opentelemetry-instrumentation-openai-v2/src/opentelemetry/instrumentation/openai_v2/__init__.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -75,4 +75,6 @@ def _instrument(self, **kwargs):
7575
)
7676

7777
def _uninstrument(self, **kwargs):
78-
unwrap("openai.resources.chat.completions.Completions", "create")
78+
import openai
79+
80+
unwrap(openai, "resources.chat.completions.Completions.create")

instrumentation/opentelemetry-instrumentation-openai-v2/test-requirements.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
openai==1.0.0
2+
pydantic==2.8.2
23
Deprecated==1.2.14
34
importlib-metadata==6.11.0
45
packaging==24.0

0 commit comments

Comments
 (0)