Skip to content

Commit 747615b

Browse files
committed
fix(instrumentation-openai): fix isEnabled() check
1 parent a839f65 commit 747615b

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

packages/instrumentation-openai/src/instrumentation.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -223,7 +223,7 @@ export class OpenAIInstrumentation extends InstrumentationBase<OpenAIInstrumenta
223223
this: ChatCompletions,
224224
...args: Parameters<ChatCompletions['create']>
225225
) {
226-
if (!self.isEnabled) {
226+
if (!self.isEnabled()) {
227227
return original.apply(this, args);
228228
}
229229

@@ -787,7 +787,7 @@ export class OpenAIInstrumentation extends InstrumentationBase<OpenAIInstrumenta
787787
this: Embeddings,
788788
...args: Parameters<Embeddings['create']>
789789
) {
790-
if (!self.isEnabled) {
790+
if (!self.isEnabled()) {
791791
return original.apply(this, args);
792792
}
793793

@@ -900,7 +900,7 @@ export class OpenAIInstrumentation extends InstrumentationBase<OpenAIInstrumenta
900900
this: Responses,
901901
...args: Parameters<Responses['create']>
902902
) {
903-
if (!self.isEnabled) {
903+
if (!self.isEnabled()) {
904904
return original.apply(this, args);
905905
}
906906

0 commit comments

Comments
 (0)