Skip to content

Commit 29e294a

Browse files
authored
fix(instrumentation-openai)!: add missing access modifiers to private methods (#3242)
1 parent 9323942 commit 29e294a

File tree

1 file changed

+8
-8
lines changed

1 file changed

+8
-8
lines changed

packages/instrumentation-openai/src/instrumentation.ts

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -169,7 +169,7 @@ export class OpenAIInstrumentation extends InstrumentationBase<OpenAIInstrumenta
169169
);
170170
}
171171

172-
_getPatchedChatCompletionsCreate(): any {
172+
private _getPatchedChatCompletionsCreate(): any {
173173
const self = this;
174174
return (original: ChatCompletions['create']) => {
175175
// https://platform.openai.com/docs/api-reference/chat/create
@@ -251,7 +251,7 @@ export class OpenAIInstrumentation extends InstrumentationBase<OpenAIInstrumenta
251251
* Start a span for this chat-completion API call. This also emits log events
252252
* as appropriate for the request params.
253253
*/
254-
_startChatCompletionsSpan(
254+
private _startChatCompletionsSpan(
255255
params: ChatCompletionCreateParams,
256256
config: OpenAIInstrumentationConfig,
257257
baseURL: string | undefined
@@ -449,7 +449,7 @@ export class OpenAIInstrumentation extends InstrumentationBase<OpenAIInstrumenta
449449
* async iterator. It should yield the chunks unchanged, and gather telemetry
450450
* data from those chunks, then end the span.
451451
*/
452-
async *_onChatCompletionsStreamIterator(
452+
private async *_onChatCompletionsStreamIterator(
453453
streamIter: AsyncIterator<ChatCompletionChunk>,
454454
span: Span,
455455
startNow: number,
@@ -604,7 +604,7 @@ export class OpenAIInstrumentation extends InstrumentationBase<OpenAIInstrumenta
604604
span.end();
605605
}
606606

607-
_onChatCompletionsCreateResult(
607+
private _onChatCompletionsCreateResult(
608608
span: Span,
609609
startNow: number,
610610
commonAttrs: Attributes,
@@ -702,7 +702,7 @@ export class OpenAIInstrumentation extends InstrumentationBase<OpenAIInstrumenta
702702
span.end();
703703
}
704704

705-
_createAPIPromiseRejectionHandler(
705+
private _createAPIPromiseRejectionHandler(
706706
startNow: number,
707707
span: Span,
708708
commonAttrs: Attributes
@@ -734,7 +734,7 @@ export class OpenAIInstrumentation extends InstrumentationBase<OpenAIInstrumenta
734734
};
735735
}
736736

737-
_getPatchedEmbeddingsCreate(): any {
737+
private _getPatchedEmbeddingsCreate(): any {
738738
const self = this;
739739
return (original: Embeddings['create']) => {
740740
// https://platform.openai.com/docs/api-reference/embeddings/create
@@ -778,7 +778,7 @@ export class OpenAIInstrumentation extends InstrumentationBase<OpenAIInstrumenta
778778
* Start a span for this chat-completion API call. This also emits log events
779779
* as appropriate for the request params.
780780
*/
781-
_startEmbeddingsSpan(
781+
private _startEmbeddingsSpan(
782782
params: EmbeddingCreateParams,
783783
baseURL: string | undefined
784784
) {
@@ -810,7 +810,7 @@ export class OpenAIInstrumentation extends InstrumentationBase<OpenAIInstrumenta
810810
return { span, ctx, commonAttrs };
811811
}
812812

813-
_onEmbeddingsCreateResult(
813+
private _onEmbeddingsCreateResult(
814814
span: Span,
815815
startNow: number,
816816
commonAttrs: Attributes,

0 commit comments

Comments
 (0)