netra-sdk 1.4.0 → 1.5.0
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/index.cjs +1495 -746
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +21 -3
- package/dist/index.d.ts +21 -3
- package/dist/index.js +1420 -670
- package/dist/index.js.map +1 -1
- package/package.json +5 -1
package/dist/index.d.cts
CHANGED
|
@@ -28,7 +28,8 @@ declare enum NetraInstruments {
|
|
|
28
28
|
*/
|
|
29
29
|
ALL = "__all__",
|
|
30
30
|
OPENAI = "openai",
|
|
31
|
-
|
|
31
|
+
GOOGLE_GENAI = "google_genai",
|
|
32
|
+
GOOGLE_GENERATIVE_AI = "google_generative_ai",
|
|
32
33
|
MISTRAL = "mistral_ai",
|
|
33
34
|
GROQ = "groq",
|
|
34
35
|
VERTEX_AI = "vertexai",
|
|
@@ -59,7 +60,7 @@ declare const DEFAULT_INSTRUMENTS: Set<NetraInstruments>;
|
|
|
59
60
|
declare class Config {
|
|
60
61
|
static readonly SDK_NAME = "netra";
|
|
61
62
|
static readonly LIBRARY_NAME = "netra";
|
|
62
|
-
static readonly LIBRARY_VERSION = "1.
|
|
63
|
+
static readonly LIBRARY_VERSION = "1.5.0";
|
|
63
64
|
static readonly TRIAL_BLOCK_DURATION_SECONDS = 900;
|
|
64
65
|
static readonly ATTRIBUTE_MAX_LEN: number;
|
|
65
66
|
static readonly CONVERSATION_MAX_LEN: number;
|
|
@@ -988,7 +989,7 @@ declare class SessionSpanProcessor implements SpanProcessor {
|
|
|
988
989
|
|
|
989
990
|
declare class SpanIOProcessor implements SpanProcessor {
|
|
990
991
|
onStart(span: Span, _parentContext: Context): void;
|
|
991
|
-
onEnd(
|
|
992
|
+
onEnd(_span: ReadableSpan): void;
|
|
992
993
|
shutdown(): Promise<void>;
|
|
993
994
|
forceFlush(): Promise<void>;
|
|
994
995
|
private _wrapSetAttribute;
|
|
@@ -1347,6 +1348,23 @@ interface SpanData {
|
|
|
1347
1348
|
input_tokens?: number;
|
|
1348
1349
|
output_tokens?: number;
|
|
1349
1350
|
details?: Record<string, unknown> | null;
|
|
1351
|
+
input_tokens_details?: {
|
|
1352
|
+
cached_tokens?: number;
|
|
1353
|
+
cache_write_tokens?: number;
|
|
1354
|
+
} | null;
|
|
1355
|
+
output_tokens_details?: {
|
|
1356
|
+
reasoning_tokens?: number;
|
|
1357
|
+
} | null;
|
|
1358
|
+
prompt_tokens?: number;
|
|
1359
|
+
completion_tokens?: number;
|
|
1360
|
+
total_tokens?: number;
|
|
1361
|
+
prompt_tokens_details?: {
|
|
1362
|
+
cached_tokens?: number;
|
|
1363
|
+
cache_write_tokens?: number;
|
|
1364
|
+
} | null;
|
|
1365
|
+
completion_tokens_details?: {
|
|
1366
|
+
reasoning_tokens?: number;
|
|
1367
|
+
} | null;
|
|
1350
1368
|
};
|
|
1351
1369
|
to_agent?: string;
|
|
1352
1370
|
from_agent?: string;
|
package/dist/index.d.ts
CHANGED
|
@@ -28,7 +28,8 @@ declare enum NetraInstruments {
|
|
|
28
28
|
*/
|
|
29
29
|
ALL = "__all__",
|
|
30
30
|
OPENAI = "openai",
|
|
31
|
-
|
|
31
|
+
GOOGLE_GENAI = "google_genai",
|
|
32
|
+
GOOGLE_GENERATIVE_AI = "google_generative_ai",
|
|
32
33
|
MISTRAL = "mistral_ai",
|
|
33
34
|
GROQ = "groq",
|
|
34
35
|
VERTEX_AI = "vertexai",
|
|
@@ -59,7 +60,7 @@ declare const DEFAULT_INSTRUMENTS: Set<NetraInstruments>;
|
|
|
59
60
|
declare class Config {
|
|
60
61
|
static readonly SDK_NAME = "netra";
|
|
61
62
|
static readonly LIBRARY_NAME = "netra";
|
|
62
|
-
static readonly LIBRARY_VERSION = "1.
|
|
63
|
+
static readonly LIBRARY_VERSION = "1.5.0";
|
|
63
64
|
static readonly TRIAL_BLOCK_DURATION_SECONDS = 900;
|
|
64
65
|
static readonly ATTRIBUTE_MAX_LEN: number;
|
|
65
66
|
static readonly CONVERSATION_MAX_LEN: number;
|
|
@@ -988,7 +989,7 @@ declare class SessionSpanProcessor implements SpanProcessor {
|
|
|
988
989
|
|
|
989
990
|
declare class SpanIOProcessor implements SpanProcessor {
|
|
990
991
|
onStart(span: Span, _parentContext: Context): void;
|
|
991
|
-
onEnd(
|
|
992
|
+
onEnd(_span: ReadableSpan): void;
|
|
992
993
|
shutdown(): Promise<void>;
|
|
993
994
|
forceFlush(): Promise<void>;
|
|
994
995
|
private _wrapSetAttribute;
|
|
@@ -1347,6 +1348,23 @@ interface SpanData {
|
|
|
1347
1348
|
input_tokens?: number;
|
|
1348
1349
|
output_tokens?: number;
|
|
1349
1350
|
details?: Record<string, unknown> | null;
|
|
1351
|
+
input_tokens_details?: {
|
|
1352
|
+
cached_tokens?: number;
|
|
1353
|
+
cache_write_tokens?: number;
|
|
1354
|
+
} | null;
|
|
1355
|
+
output_tokens_details?: {
|
|
1356
|
+
reasoning_tokens?: number;
|
|
1357
|
+
} | null;
|
|
1358
|
+
prompt_tokens?: number;
|
|
1359
|
+
completion_tokens?: number;
|
|
1360
|
+
total_tokens?: number;
|
|
1361
|
+
prompt_tokens_details?: {
|
|
1362
|
+
cached_tokens?: number;
|
|
1363
|
+
cache_write_tokens?: number;
|
|
1364
|
+
} | null;
|
|
1365
|
+
completion_tokens_details?: {
|
|
1366
|
+
reasoning_tokens?: number;
|
|
1367
|
+
} | null;
|
|
1350
1368
|
};
|
|
1351
1369
|
to_agent?: string;
|
|
1352
1370
|
from_agent?: string;
|