diff --git a/CHANGELOG.md b/CHANGELOG.md index cf81c92..57b9062 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,4 +1,8 @@ # @langtrase/typescript-sdk +## 6.3.2 +### Patch Changes + +- Add Support for preview module inside VertexAI ## 5.4.0 diff --git a/src/instrumentation/vertexai/instrumentation.ts b/src/instrumentation/vertexai/instrumentation.ts index 5a506b9..a55f812 100644 --- a/src/instrumentation/vertexai/instrumentation.ts +++ b/src/instrumentation/vertexai/instrumentation.ts @@ -55,6 +55,18 @@ class VertexAIInstrumentation extends InstrumentationBase { this._unpatch(vertexai) } + this._wrap(vertexai.GenerativeModelPreview.prototype, + 'generateContent', + (originalMethod: (...args: any[]) => any) => + generateContentPatch(originalMethod, this.tracer, APIS.vertexai.GENERATE_CONTENT.METHOD, this.instrumentationVersion, name, moduleVersion) + ) + + this._wrap(vertexai.GenerativeModelPreview.prototype, + 'generateContentStream', + (originalMethod: (...args: any[]) => any) => + generateContentPatch(originalMethod, this.tracer, APIS.vertexai.GENERATE_CONTENT_STREAM.METHOD, this.instrumentationVersion, name, moduleVersion) + ) + this._wrap(vertexai.GenerativeModel.prototype, 'generateContent', (originalMethod: (...args: any[]) => any) =>