Skip to content

Commit ddbdba3

Browse files
authored
Merge pull request #197 from Scale3-Labs/ali/add-support-for-preview-vertexai
Ali/add support for preview vertexai
2 parents 14e0863 + faf82a1 commit ddbdba3

File tree

2 files changed

+16
-0
lines changed

2 files changed

+16
-0
lines changed

CHANGELOG.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,8 @@
11
# @langtrase/typescript-sdk
2+
## 6.3.2
3+
### Patch Changes
4+
5+
- Add Support for preview module inside VertexAI
26

37
## 5.4.0
48

src/instrumentation/vertexai/instrumentation.ts

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -55,6 +55,18 @@ class VertexAIInstrumentation extends InstrumentationBase<any> {
5555
this._unpatch(vertexai)
5656
}
5757

58+
this._wrap(vertexai.GenerativeModelPreview.prototype,
59+
'generateContent',
60+
(originalMethod: (...args: any[]) => any) =>
61+
generateContentPatch(originalMethod, this.tracer, APIS.vertexai.GENERATE_CONTENT.METHOD, this.instrumentationVersion, name, moduleVersion)
62+
)
63+
64+
this._wrap(vertexai.GenerativeModelPreview.prototype,
65+
'generateContentStream',
66+
(originalMethod: (...args: any[]) => any) =>
67+
generateContentPatch(originalMethod, this.tracer, APIS.vertexai.GENERATE_CONTENT_STREAM.METHOD, this.instrumentationVersion, name, moduleVersion)
68+
)
69+
5870
this._wrap(vertexai.GenerativeModel.prototype,
5971
'generateContent',
6072
(originalMethod: (...args: any[]) => any) =>

0 commit comments

Comments
 (0)