@visibe.ai/node 0.1.10 → 0.1.11
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/cjs/index.js +6 -3
- package/dist/esm/index.js +6 -3
- package/package.json +1 -1
package/dist/cjs/index.js
CHANGED
|
@@ -53,7 +53,9 @@ function patchFramework(framework, client) {
|
|
|
53
53
|
case 'openai': {
|
|
54
54
|
const openaiModule = require('openai');
|
|
55
55
|
_originalOpenAI = openaiModule.OpenAI;
|
|
56
|
-
|
|
56
|
+
// Named 'OpenAI' so client.constructor.name === 'OpenAI' after construction.
|
|
57
|
+
// applyIntegration() in client.ts uses constructor.name to detect the client type.
|
|
58
|
+
const PatchedOpenAI = class OpenAI extends _originalOpenAI {
|
|
57
59
|
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
58
60
|
constructor(...args) {
|
|
59
61
|
super(...args);
|
|
@@ -75,7 +77,8 @@ function patchFramework(framework, client) {
|
|
|
75
77
|
case 'anthropic': {
|
|
76
78
|
const anthropicModule = require('@anthropic-ai/sdk');
|
|
77
79
|
_originalAnthropic = anthropicModule.Anthropic;
|
|
78
|
-
|
|
80
|
+
// Named 'Anthropic' so constructor.name check in applyIntegration() matches.
|
|
81
|
+
const PatchedAnthropic = class Anthropic extends _originalAnthropic {
|
|
79
82
|
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
80
83
|
constructor(...args) {
|
|
81
84
|
super(...args);
|
|
@@ -95,7 +98,7 @@ function patchFramework(framework, client) {
|
|
|
95
98
|
case 'bedrock': {
|
|
96
99
|
const bedrockModule = require('@aws-sdk/client-bedrock-runtime');
|
|
97
100
|
_originalBedrockClient = bedrockModule.BedrockRuntimeClient;
|
|
98
|
-
bedrockModule.BedrockRuntimeClient = class extends _originalBedrockClient {
|
|
101
|
+
bedrockModule.BedrockRuntimeClient = class BedrockRuntimeClient extends _originalBedrockClient {
|
|
99
102
|
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
100
103
|
constructor(...args) {
|
|
101
104
|
super(...args);
|
package/dist/esm/index.js
CHANGED
|
@@ -47,7 +47,9 @@ function patchFramework(framework, client) {
|
|
|
47
47
|
case 'openai': {
|
|
48
48
|
const openaiModule = require('openai');
|
|
49
49
|
_originalOpenAI = openaiModule.OpenAI;
|
|
50
|
-
|
|
50
|
+
// Named 'OpenAI' so client.constructor.name === 'OpenAI' after construction.
|
|
51
|
+
// applyIntegration() in client.ts uses constructor.name to detect the client type.
|
|
52
|
+
const PatchedOpenAI = class OpenAI extends _originalOpenAI {
|
|
51
53
|
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
52
54
|
constructor(...args) {
|
|
53
55
|
super(...args);
|
|
@@ -69,7 +71,8 @@ function patchFramework(framework, client) {
|
|
|
69
71
|
case 'anthropic': {
|
|
70
72
|
const anthropicModule = require('@anthropic-ai/sdk');
|
|
71
73
|
_originalAnthropic = anthropicModule.Anthropic;
|
|
72
|
-
|
|
74
|
+
// Named 'Anthropic' so constructor.name check in applyIntegration() matches.
|
|
75
|
+
const PatchedAnthropic = class Anthropic extends _originalAnthropic {
|
|
73
76
|
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
74
77
|
constructor(...args) {
|
|
75
78
|
super(...args);
|
|
@@ -89,7 +92,7 @@ function patchFramework(framework, client) {
|
|
|
89
92
|
case 'bedrock': {
|
|
90
93
|
const bedrockModule = require('@aws-sdk/client-bedrock-runtime');
|
|
91
94
|
_originalBedrockClient = bedrockModule.BedrockRuntimeClient;
|
|
92
|
-
bedrockModule.BedrockRuntimeClient = class extends _originalBedrockClient {
|
|
95
|
+
bedrockModule.BedrockRuntimeClient = class BedrockRuntimeClient extends _originalBedrockClient {
|
|
93
96
|
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
94
97
|
constructor(...args) {
|
|
95
98
|
super(...args);
|
package/package.json
CHANGED