@visibe.ai/node 0.1.10 → 0.1.12
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/README.md +14 -7
- package/dist/cjs/index.js +6 -3
- package/dist/esm/index.js +6 -3
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -14,15 +14,21 @@
|
|
|
14
14
|
|
|
15
15
|
## 📦 Getting Started
|
|
16
16
|
|
|
17
|
-
###
|
|
17
|
+
### 1. Create an account
|
|
18
|
+
|
|
19
|
+
Sign up at **[app.visibe.ai](https://app.visibe.ai)** and create a project.
|
|
20
|
+
|
|
21
|
+
### 2. Get an API key
|
|
22
|
+
|
|
23
|
+
In your project, go to **Settings → API Keys** and generate a new key. It will look like `sk_live_...`.
|
|
24
|
+
|
|
25
|
+
### 3. Install the SDK
|
|
18
26
|
|
|
19
27
|
```bash
|
|
20
28
|
npm install @visibe.ai/node
|
|
21
29
|
```
|
|
22
30
|
|
|
23
|
-
###
|
|
24
|
-
|
|
25
|
-
Set your API key:
|
|
31
|
+
### 4. Set your API key
|
|
26
32
|
|
|
27
33
|
```bash
|
|
28
34
|
export VISIBE_API_KEY=sk_live_your_api_key_here
|
|
@@ -34,7 +40,7 @@ Or in a `.env` file:
|
|
|
34
40
|
VISIBE_API_KEY=sk_live_your_api_key_here
|
|
35
41
|
```
|
|
36
42
|
|
|
37
|
-
###
|
|
43
|
+
### 5. Instrument your app
|
|
38
44
|
|
|
39
45
|
```typescript
|
|
40
46
|
import { init } from '@visibe.ai/node'
|
|
@@ -320,8 +326,9 @@ await shutdown()
|
|
|
320
326
|
|
|
321
327
|
## 🔗 Resources
|
|
322
328
|
|
|
323
|
-
- [
|
|
324
|
-
- [
|
|
329
|
+
- [visibe.ai](https://visibe.ai) — Product website
|
|
330
|
+
- [app.visibe.ai](https://app.visibe.ai) — Dashboard (sign up, manage API keys, view traces)
|
|
331
|
+
- [npm Package](https://www.npmjs.com/package/@visibe.ai/node) — Latest version on npm
|
|
325
332
|
|
|
326
333
|
---
|
|
327
334
|
|
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