Skip to content

Commit

Permalink
fix: allow manual patch for Gemini and VertexAI (#169)
Browse files Browse the repository at this point in the history
  • Loading branch information
darshit-s3 authored Aug 29, 2024
1 parent dd3bd22 commit 7202a24
Show file tree
Hide file tree
Showing 4 changed files with 17 additions and 1 deletion.
6 changes: 6 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,11 @@
# @langtrase/typescript-sdk

## 5.3.1

### Patch Changes

- Fix allowing manual patch for Gemini and Vertex AI.

## 5.3.0

### Minor Changes
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@langtrase/typescript-sdk",
"version": "5.3.0",
"version": "5.3.1",
"description": "A typescript SDK for Langtrace",
"main": "dist/index.js",
"types": "dist/index.d.ts",
Expand Down
5 changes: 5 additions & 0 deletions src/instrumentation/gemini/instrumentation.ts
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,11 @@ class GeminiInstrumentation extends InstrumentationBase<any> {
super(name, version)
}

public manualPatch (gemini: any): void {
diag.debug('Manually instrumenting Gemini SDK')
this._patch(gemini)
}

init (): Array<InstrumentationNodeModuleDefinition<any>> {
const module = new InstrumentationNodeModuleDefinition<any>(
'@google/generative-ai',
Expand Down
5 changes: 5 additions & 0 deletions src/instrumentation/vertexai/instrumentation.ts
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,11 @@ class VertexAIInstrumentation extends InstrumentationBase<any> {
super(name, version)
}

public manualPatch (vertexai: any): void {
diag.debug('Manually instrumenting Vertex AI SDK')
this._patch(vertexai)
}

init (): Array<InstrumentationNodeModuleDefinition<any>> {
const module = new InstrumentationNodeModuleDefinition<any>(
'@google-cloud/vertexai',
Expand Down

0 comments on commit 7202a24

Please sign in to comment.