langwatch 0.35.0 → 0.37.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/{chunk-HBVGKWJK.js → chunk-ADJOFPAZ.js} +9 -1
- package/dist/chunk-ADJOFPAZ.js.map +1 -0
- package/dist/{chunk-3QHURXIZ.mjs → chunk-C323F5VC.mjs} +9 -1
- package/dist/chunk-C323F5VC.mjs.map +1 -0
- package/dist/{chunk-KH2GOLFO.mjs → chunk-F3CCZPMR.mjs} +2 -2
- package/dist/{chunk-KH2GOLFO.mjs.map → chunk-F3CCZPMR.mjs.map} +1 -1
- package/dist/{chunk-53AMPF5E.js → chunk-LDN74L7R.js} +12 -12
- package/dist/{chunk-53AMPF5E.js.map → chunk-LDN74L7R.js.map} +1 -1
- package/dist/{chunk-XMAFHMLS.mjs → chunk-W5LSH44Z.mjs} +2 -2
- package/dist/{chunk-EDWIKCYX.js → chunk-XL6DKL2L.js} +2 -2
- package/dist/{chunk-EDWIKCYX.js.map → chunk-XL6DKL2L.js.map} +1 -1
- package/dist/cli/bundle.js +164 -122
- package/dist/{implementation-Cv1hPZBQ.d.mts → implementation-CPfDot-W.d.mts} +1 -1
- package/dist/{implementation-CMWs8g5L.d.ts → implementation-aYHmyVZ_.d.ts} +1 -1
- package/dist/index.d.mts +2 -2
- package/dist/index.d.ts +2 -2
- package/dist/index.js +28 -28
- package/dist/index.mjs +3 -3
- package/dist/observability-sdk/index.d.mts +3 -3
- package/dist/observability-sdk/index.d.ts +3 -3
- package/dist/observability-sdk/index.js +3 -3
- package/dist/observability-sdk/index.mjs +2 -2
- package/dist/observability-sdk/instrumentation/langchain/index.d.mts +1 -1
- package/dist/observability-sdk/instrumentation/langchain/index.d.ts +1 -1
- package/dist/observability-sdk/instrumentation/langchain/index.js +3 -3
- package/dist/observability-sdk/instrumentation/langchain/index.mjs +1 -1
- package/dist/observability-sdk/setup/node/index.js +3 -3
- package/dist/observability-sdk/setup/node/index.mjs +2 -2
- package/dist/{types-D-yAkWoC.d.ts → types-CeZ-M8JZ.d.ts} +2 -2
- package/dist/{types-bfBzGB7S.d.mts → types-Cw-3VUv7.d.mts} +2 -2
- package/package.json +1 -1
- package/dist/chunk-3QHURXIZ.mjs.map +0 -1
- package/dist/chunk-HBVGKWJK.js.map +0 -1
- /package/dist/{chunk-XMAFHMLS.mjs.map → chunk-W5LSH44Z.mjs.map} +0 -0
|
@@ -4,7 +4,7 @@ import { ExportResult } from '@opentelemetry/core';
|
|
|
4
4
|
import { Logger, LogRecord, LoggerProvider } from '@opentelemetry/api-logs';
|
|
5
5
|
import { b as SemConvLogRecordAttributes, a as SemConvAttributes } from './types-VOZv9LYO.mjs';
|
|
6
6
|
import { TracerProvider } from '@opentelemetry/api';
|
|
7
|
-
import { j as LangWatchTracer } from './types-
|
|
7
|
+
import { j as LangWatchTracer } from './types-Cw-3VUv7.mjs';
|
|
8
8
|
|
|
9
9
|
/**
|
|
10
10
|
* Filterable Batch Span Exporter for OpenTelemetry
|
|
@@ -4,7 +4,7 @@ import { ExportResult } from '@opentelemetry/core';
|
|
|
4
4
|
import { Logger, LogRecord, LoggerProvider } from '@opentelemetry/api-logs';
|
|
5
5
|
import { b as SemConvLogRecordAttributes, a as SemConvAttributes } from './types-VOZv9LYO.js';
|
|
6
6
|
import { TracerProvider } from '@opentelemetry/api';
|
|
7
|
-
import { j as LangWatchTracer } from './types-
|
|
7
|
+
import { j as LangWatchTracer } from './types-CeZ-M8JZ.js';
|
|
8
8
|
|
|
9
9
|
/**
|
|
10
10
|
* Filterable Batch Span Exporter for OpenTelemetry
|
package/dist/index.d.mts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { L as Logger, C as ConsoleLogger, N as NoOpLogger } from './index-D7rKIGrO.mjs';
|
|
2
|
-
export { F as FilterableBatchSpanProcessor, L as LangWatchExporter, S as SpanProcessingExcludeRule, g as getLangWatchLogger, a as getLangWatchTracer } from './implementation-
|
|
2
|
+
export { F as FilterableBatchSpanProcessor, L as LangWatchExporter, S as SpanProcessingExcludeRule, g as getLangWatchLogger, a as getLangWatchTracer } from './implementation-CPfDot-W.mjs';
|
|
3
3
|
import { z } from 'zod';
|
|
4
|
-
import { p as paths, P as PromptResponse, C as CreatePromptBody, U as UpdatePromptBody, T as TagDefinition, a as CreatedTag, o as operations, b as PromptData, F as FetchPolicy, c as Prompt, L as LangWatchSpan, d as components } from './types-
|
|
4
|
+
import { p as paths, P as PromptResponse, C as CreatePromptBody, U as UpdatePromptBody, T as TagDefinition, a as CreatedTag, o as operations, b as PromptData, F as FetchPolicy, c as Prompt, L as LangWatchSpan, d as components } from './types-Cw-3VUv7.mjs';
|
|
5
5
|
import openApiCreateClient from 'openapi-fetch';
|
|
6
6
|
export { l as attributes } from './types-VOZv9LYO.mjs';
|
|
7
7
|
import { CliHandledErrorReason, CliHandledError } from '@langwatch/langy/cards/handled-error';
|
package/dist/index.d.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { L as Logger, C as ConsoleLogger, N as NoOpLogger } from './index-D7rKIGrO.js';
|
|
2
|
-
export { F as FilterableBatchSpanProcessor, L as LangWatchExporter, S as SpanProcessingExcludeRule, g as getLangWatchLogger, a as getLangWatchTracer } from './implementation-
|
|
2
|
+
export { F as FilterableBatchSpanProcessor, L as LangWatchExporter, S as SpanProcessingExcludeRule, g as getLangWatchLogger, a as getLangWatchTracer } from './implementation-aYHmyVZ_.js';
|
|
3
3
|
import { z } from 'zod';
|
|
4
|
-
import { p as paths, P as PromptResponse, C as CreatePromptBody, U as UpdatePromptBody, T as TagDefinition, a as CreatedTag, o as operations, b as PromptData, F as FetchPolicy, c as Prompt, L as LangWatchSpan, d as components } from './types-
|
|
4
|
+
import { p as paths, P as PromptResponse, C as CreatePromptBody, U as UpdatePromptBody, T as TagDefinition, a as CreatedTag, o as operations, b as PromptData, F as FetchPolicy, c as Prompt, L as LangWatchSpan, d as components } from './types-CeZ-M8JZ.js';
|
|
5
5
|
import openApiCreateClient from 'openapi-fetch';
|
|
6
6
|
export { l as attributes } from './types-VOZv9LYO.js';
|
|
7
7
|
import { CliHandledErrorReason, CliHandledError } from '@langwatch/langy/cards/handled-error';
|
package/dist/index.js
CHANGED
|
@@ -4,10 +4,10 @@ var _chunkIUSLT65Zjs = require('./chunk-IUSLT65Z.js');
|
|
|
4
4
|
|
|
5
5
|
|
|
6
6
|
|
|
7
|
-
var
|
|
7
|
+
var _chunkADJOFPAZjs = require('./chunk-ADJOFPAZ.js');
|
|
8
8
|
|
|
9
9
|
|
|
10
|
-
var
|
|
10
|
+
var _chunkLDN74L7Rjs = require('./chunk-LDN74L7R.js');
|
|
11
11
|
|
|
12
12
|
|
|
13
13
|
|
|
@@ -19,7 +19,7 @@ var _chunk53AMPF5Ejs = require('./chunk-53AMPF5E.js');
|
|
|
19
19
|
|
|
20
20
|
|
|
21
21
|
|
|
22
|
-
var
|
|
22
|
+
var _chunkXL6DKL2Ljs = require('./chunk-XL6DKL2L.js');
|
|
23
23
|
|
|
24
24
|
|
|
25
25
|
|
|
@@ -312,7 +312,7 @@ var PromptServiceTracingDecorator = class {
|
|
|
312
312
|
};
|
|
313
313
|
|
|
314
314
|
// src/client-sdk/services/prompts/tracing/tracer.ts
|
|
315
|
-
var tracer =
|
|
315
|
+
var tracer = _chunkADJOFPAZjs.getLangWatchTracer.call(void 0, `${_chunkXL6DKL2Ljs.LANGWATCH_SDK_NAME_CLIENT}.prompts`, _chunkXL6DKL2Ljs.LANGWATCH_SDK_VERSION);
|
|
316
316
|
|
|
317
317
|
// src/client-sdk/tracing/create-tracing-proxy.ts
|
|
318
318
|
var _api = require('@opentelemetry/api');
|
|
@@ -643,16 +643,16 @@ var handledErrorMiddleware = {
|
|
|
643
643
|
if (handledError) throw handledError;
|
|
644
644
|
}
|
|
645
645
|
};
|
|
646
|
-
var createLangWatchApiClient = (apiKey = ((_a) => (_a = process.env.LANGWATCH_API_KEY) != null ? _a : "")(), endpoint = ((_b) => (_b = process.env.LANGWATCH_ENDPOINT) != null ? _b : (0,
|
|
646
|
+
var createLangWatchApiClient = (apiKey = ((_a) => (_a = process.env.LANGWATCH_API_KEY) != null ? _a : "")(), endpoint = ((_b) => (_b = process.env.LANGWATCH_ENDPOINT) != null ? _b : (0, _chunkXL6DKL2Ljs.DEFAULT_ENDPOINT))(), projectId = process.env.LANGWATCH_PROJECT_ID) => {
|
|
647
647
|
const client = _openapifetch2.default.call(void 0, {
|
|
648
648
|
baseUrl: endpoint,
|
|
649
|
-
headers: _chunkTKSTXX3Djs.__spreadProps.call(void 0, _chunkTKSTXX3Djs.__spreadValues.call(void 0, {},
|
|
649
|
+
headers: _chunkTKSTXX3Djs.__spreadProps.call(void 0, _chunkTKSTXX3Djs.__spreadValues.call(void 0, {}, _chunkXL6DKL2Ljs.buildAuthHeaders.call(void 0, { apiKey, projectId })), {
|
|
650
650
|
"content-type": "application/json",
|
|
651
|
-
"user-agent": `langwatch-sdk-node/${
|
|
652
|
-
"x-langwatch-sdk-name":
|
|
653
|
-
"x-langwatch-sdk-language":
|
|
654
|
-
"x-langwatch-sdk-version":
|
|
655
|
-
"x-langwatch-sdk-platform":
|
|
651
|
+
"user-agent": `langwatch-sdk-node/${_chunkXL6DKL2Ljs.version}`,
|
|
652
|
+
"x-langwatch-sdk-name": _chunkXL6DKL2Ljs.LANGWATCH_SDK_NAME_OBSERVABILITY,
|
|
653
|
+
"x-langwatch-sdk-language": _chunkXL6DKL2Ljs.LANGWATCH_SDK_LANGUAGE,
|
|
654
|
+
"x-langwatch-sdk-version": _chunkXL6DKL2Ljs.LANGWATCH_SDK_VERSION,
|
|
655
|
+
"x-langwatch-sdk-platform": _chunkXL6DKL2Ljs.LANGWATCH_SDK_RUNTIME.call(void 0, )
|
|
656
656
|
})
|
|
657
657
|
});
|
|
658
658
|
client.use(handledErrorMiddleware);
|
|
@@ -1858,7 +1858,7 @@ var DatasetPlanLimitError = class extends DatasetError {
|
|
|
1858
1858
|
};
|
|
1859
1859
|
|
|
1860
1860
|
// src/client-sdk/services/datasets/tracing/tracer.ts
|
|
1861
|
-
var tracer2 =
|
|
1861
|
+
var tracer2 = _chunkADJOFPAZjs.getLangWatchTracer.call(void 0, `${_chunkXL6DKL2Ljs.LANGWATCH_SDK_NAME_CLIENT}.datasets`, _chunkXL6DKL2Ljs.LANGWATCH_SDK_VERSION);
|
|
1862
1862
|
|
|
1863
1863
|
// src/client-sdk/services/datasets/dataset.service.ts
|
|
1864
1864
|
var DatasetService = class {
|
|
@@ -2144,7 +2144,7 @@ var DatasetService = class {
|
|
|
2144
2144
|
const url = `${endpoint.replace(/\/$/, "")}${path2}`;
|
|
2145
2145
|
const response = await fetch(url, {
|
|
2146
2146
|
method: "POST",
|
|
2147
|
-
headers:
|
|
2147
|
+
headers: _chunkXL6DKL2Ljs.buildAuthHeaders.call(void 0, { apiKey }),
|
|
2148
2148
|
body: formData
|
|
2149
2149
|
});
|
|
2150
2150
|
if (!response.ok) {
|
|
@@ -2728,7 +2728,7 @@ var Experiment = class _Experiment {
|
|
|
2728
2728
|
* Initialize an evaluation session
|
|
2729
2729
|
*/
|
|
2730
2730
|
static async init(name, options) {
|
|
2731
|
-
|
|
2731
|
+
_chunkLDN74L7Rjs.ensureSetup.call(void 0, );
|
|
2732
2732
|
const experiment = new _Experiment(name, options);
|
|
2733
2733
|
await experiment.initialize();
|
|
2734
2734
|
return experiment;
|
|
@@ -2747,7 +2747,7 @@ var Experiment = class _Experiment {
|
|
|
2747
2747
|
method: "POST",
|
|
2748
2748
|
headers: _chunkTKSTXX3Djs.__spreadValues.call(void 0, {
|
|
2749
2749
|
"Content-Type": "application/json"
|
|
2750
|
-
},
|
|
2750
|
+
}, _chunkXL6DKL2Ljs.buildAuthHeaders.call(void 0, { apiKey: this.apiKey })),
|
|
2751
2751
|
body: JSON.stringify({
|
|
2752
2752
|
experiment_name: this.name,
|
|
2753
2753
|
experiment_slug: this.experimentSlug,
|
|
@@ -2865,7 +2865,7 @@ var Experiment = class _Experiment {
|
|
|
2865
2865
|
}
|
|
2866
2866
|
},
|
|
2867
2867
|
async (otelSpan) => {
|
|
2868
|
-
const span =
|
|
2868
|
+
const span = _chunkADJOFPAZjs.createLangWatchSpan.call(void 0, otelSpan);
|
|
2869
2869
|
const spanContext = otelSpan.spanContext();
|
|
2870
2870
|
const traceId = spanContext.traceId;
|
|
2871
2871
|
this.currentTraceId = traceId;
|
|
@@ -3037,7 +3037,7 @@ var Experiment = class _Experiment {
|
|
|
3037
3037
|
method: "POST",
|
|
3038
3038
|
headers: _chunkTKSTXX3Djs.__spreadValues.call(void 0, {
|
|
3039
3039
|
"Content-Type": "application/json"
|
|
3040
|
-
},
|
|
3040
|
+
}, _chunkXL6DKL2Ljs.buildAuthHeaders.call(void 0, { apiKey: this.apiKey })),
|
|
3041
3041
|
body: JSON.stringify({
|
|
3042
3042
|
trace_id: traceId != null ? traceId : null,
|
|
3043
3043
|
span_id: spanId != null ? spanId : null,
|
|
@@ -3128,7 +3128,7 @@ var Experiment = class _Experiment {
|
|
|
3128
3128
|
},
|
|
3129
3129
|
_api.ROOT_CONTEXT,
|
|
3130
3130
|
async (otelSpan) => {
|
|
3131
|
-
const span =
|
|
3131
|
+
const span = _chunkADJOFPAZjs.createLangWatchSpan.call(void 0, otelSpan);
|
|
3132
3132
|
const spanContext = otelSpan.spanContext();
|
|
3133
3133
|
const rawTraceId = spanContext.traceId;
|
|
3134
3134
|
spanId = spanContext.spanId;
|
|
@@ -3405,7 +3405,7 @@ var Experiment = class _Experiment {
|
|
|
3405
3405
|
method: "POST",
|
|
3406
3406
|
headers: _chunkTKSTXX3Djs.__spreadValues.call(void 0, {
|
|
3407
3407
|
"Content-Type": "application/json"
|
|
3408
|
-
},
|
|
3408
|
+
}, _chunkXL6DKL2Ljs.buildAuthHeaders.call(void 0, { apiKey: this.apiKey })),
|
|
3409
3409
|
body: JSON.stringify(body)
|
|
3410
3410
|
}).then((response) => {
|
|
3411
3411
|
if (!response.ok) {
|
|
@@ -4265,7 +4265,7 @@ var EvaluationsFacade = class {
|
|
|
4265
4265
|
},
|
|
4266
4266
|
_api.context.active()
|
|
4267
4267
|
);
|
|
4268
|
-
const langwatchSpan =
|
|
4268
|
+
const langwatchSpan = _chunkADJOFPAZjs.createLangWatchSpan.call(void 0, otelSpan);
|
|
4269
4269
|
langwatchSpan.setType(spanType);
|
|
4270
4270
|
langwatchSpan.setInput(_chunkTKSTXX3Djs.__spreadValues.call(void 0, {
|
|
4271
4271
|
data
|
|
@@ -4285,7 +4285,7 @@ var EvaluationsFacade = class {
|
|
|
4285
4285
|
method: "POST",
|
|
4286
4286
|
headers: _chunkTKSTXX3Djs.__spreadValues.call(void 0, {
|
|
4287
4287
|
"Content-Type": "application/json"
|
|
4288
|
-
},
|
|
4288
|
+
}, _chunkXL6DKL2Ljs.buildAuthHeaders.call(void 0, { apiKey: _chunkTKSTXX3Djs.__privateGet.call(void 0, this, _apiKey) })),
|
|
4289
4289
|
body: JSON.stringify(requestBody)
|
|
4290
4290
|
});
|
|
4291
4291
|
if (!response.ok) {
|
|
@@ -5151,12 +5151,12 @@ var MonitorsApiService = class {
|
|
|
5151
5151
|
constructor(config) {
|
|
5152
5152
|
var _a, _b, _c, _d;
|
|
5153
5153
|
this.apiKey = (_b = (_a = config == null ? void 0 : config.apiKey) != null ? _a : process.env.LANGWATCH_API_KEY) != null ? _b : "";
|
|
5154
|
-
this.endpoint = (_d = (_c = config == null ? void 0 : config.endpoint) != null ? _c : process.env.LANGWATCH_ENDPOINT) != null ? _d :
|
|
5154
|
+
this.endpoint = (_d = (_c = config == null ? void 0 : config.endpoint) != null ? _c : process.env.LANGWATCH_ENDPOINT) != null ? _d : _chunkXL6DKL2Ljs.DEFAULT_ENDPOINT;
|
|
5155
5155
|
}
|
|
5156
5156
|
async request(path2, options) {
|
|
5157
5157
|
var _a, _b;
|
|
5158
5158
|
const response = await fetch(`${this.endpoint}${path2}`, _chunkTKSTXX3Djs.__spreadProps.call(void 0, _chunkTKSTXX3Djs.__spreadValues.call(void 0, {}, options), {
|
|
5159
|
-
headers: _chunkTKSTXX3Djs.__spreadValues.call(void 0, _chunkTKSTXX3Djs.__spreadProps.call(void 0, _chunkTKSTXX3Djs.__spreadValues.call(void 0, {},
|
|
5159
|
+
headers: _chunkTKSTXX3Djs.__spreadValues.call(void 0, _chunkTKSTXX3Djs.__spreadProps.call(void 0, _chunkTKSTXX3Djs.__spreadValues.call(void 0, {}, _chunkXL6DKL2Ljs.buildAuthHeaders.call(void 0, { apiKey: this.apiKey })), {
|
|
5160
5160
|
"Content-Type": "application/json"
|
|
5161
5161
|
}), options == null ? void 0 : options.headers)
|
|
5162
5162
|
}));
|
|
@@ -5226,12 +5226,12 @@ var SecretsApiService = class {
|
|
|
5226
5226
|
constructor(config) {
|
|
5227
5227
|
var _a, _b, _c, _d;
|
|
5228
5228
|
this.apiKey = (_b = (_a = config == null ? void 0 : config.apiKey) != null ? _a : process.env.LANGWATCH_API_KEY) != null ? _b : "";
|
|
5229
|
-
this.endpoint = (_d = (_c = config == null ? void 0 : config.endpoint) != null ? _c : process.env.LANGWATCH_ENDPOINT) != null ? _d :
|
|
5229
|
+
this.endpoint = (_d = (_c = config == null ? void 0 : config.endpoint) != null ? _c : process.env.LANGWATCH_ENDPOINT) != null ? _d : _chunkXL6DKL2Ljs.DEFAULT_ENDPOINT;
|
|
5230
5230
|
}
|
|
5231
5231
|
async request(path2, options) {
|
|
5232
5232
|
var _a, _b;
|
|
5233
5233
|
const response = await fetch(`${this.endpoint}${path2}`, _chunkTKSTXX3Djs.__spreadProps.call(void 0, _chunkTKSTXX3Djs.__spreadValues.call(void 0, {}, options), {
|
|
5234
|
-
headers: _chunkTKSTXX3Djs.__spreadValues.call(void 0, _chunkTKSTXX3Djs.__spreadProps.call(void 0, _chunkTKSTXX3Djs.__spreadValues.call(void 0, {},
|
|
5234
|
+
headers: _chunkTKSTXX3Djs.__spreadValues.call(void 0, _chunkTKSTXX3Djs.__spreadProps.call(void 0, _chunkTKSTXX3Djs.__spreadValues.call(void 0, {}, _chunkXL6DKL2Ljs.buildAuthHeaders.call(void 0, { apiKey: this.apiKey })), {
|
|
5235
5235
|
"Content-Type": "application/json"
|
|
5236
5236
|
}), options == null ? void 0 : options.headers)
|
|
5237
5237
|
}));
|
|
@@ -5293,7 +5293,7 @@ var TracesError = class extends Error {
|
|
|
5293
5293
|
};
|
|
5294
5294
|
|
|
5295
5295
|
// src/client-sdk/services/traces/tracing/tracer.ts
|
|
5296
|
-
var tracer3 =
|
|
5296
|
+
var tracer3 = _chunkADJOFPAZjs.getLangWatchTracer.call(void 0, `${_chunkXL6DKL2Ljs.LANGWATCH_SDK_NAME_CLIENT}.traces`, _chunkXL6DKL2Ljs.LANGWATCH_SDK_VERSION);
|
|
5297
5297
|
|
|
5298
5298
|
// src/client-sdk/services/traces/service.ts
|
|
5299
5299
|
var TracesService = class {
|
|
@@ -5363,7 +5363,7 @@ var LangWatch = class {
|
|
|
5363
5363
|
_chunkTKSTXX3Djs.__privateAdd.call(void 0, this, _LangWatch_instances);
|
|
5364
5364
|
var _a, _b, _c, _d;
|
|
5365
5365
|
const apiKey = (_b = (_a = options.apiKey) != null ? _a : process.env.LANGWATCH_API_KEY) != null ? _b : "";
|
|
5366
|
-
const endpoint = (_d = (_c = options.endpoint) != null ? _c : process.env.LANGWATCH_ENDPOINT) != null ? _d :
|
|
5366
|
+
const endpoint = (_d = (_c = options.endpoint) != null ? _c : process.env.LANGWATCH_ENDPOINT) != null ? _d : _chunkXL6DKL2Ljs.DEFAULT_ENDPOINT;
|
|
5367
5367
|
this.config = _chunkTKSTXX3Djs.__privateMethod.call(void 0, this, _LangWatch_instances, createInternalConfig_fn).call(this, {
|
|
5368
5368
|
apiKey,
|
|
5369
5369
|
endpoint,
|
|
@@ -5462,5 +5462,5 @@ var logger = {
|
|
|
5462
5462
|
|
|
5463
5463
|
|
|
5464
5464
|
|
|
5465
|
-
exports.DatasetApiError = DatasetApiError; exports.DatasetError = DatasetError; exports.DatasetNotFoundError = DatasetNotFoundError; exports.DatasetPlanLimitError = DatasetPlanLimitError; exports.DatasetValidationError = DatasetValidationError; exports.DatasetsFacade = DatasetsFacade; exports.EvaluationError = EvaluationError; exports.EvaluationsApiError = EvaluationsApiError; exports.EvaluationsFacade = EvaluationsFacade; exports.EvaluatorCallError = EvaluatorCallError; exports.EvaluatorError = EvaluatorError; exports.EvaluatorNotFoundError = EvaluatorNotFoundError; exports.EvaluatorsApiError = EvaluatorsApiError; exports.EvaluatorsApiService = EvaluatorsApiService; exports.Experiment = Experiment; exports.ExperimentApiError = ExperimentApiError; exports.ExperimentError = ExperimentError; exports.ExperimentInitError = ExperimentInitError; exports.ExperimentsFacade = ExperimentsFacade; exports.FetchPolicy = FetchPolicy; exports.FilterableBatchSpanProcessor = _chunkIUSLT65Zjs.FilterableBatchSpanProcessor; exports.LangWatch = LangWatch; exports.LangWatchApiError = LangWatchApiError; exports.LangWatchExporter =
|
|
5465
|
+
exports.DatasetApiError = DatasetApiError; exports.DatasetError = DatasetError; exports.DatasetNotFoundError = DatasetNotFoundError; exports.DatasetPlanLimitError = DatasetPlanLimitError; exports.DatasetValidationError = DatasetValidationError; exports.DatasetsFacade = DatasetsFacade; exports.EvaluationError = EvaluationError; exports.EvaluationsApiError = EvaluationsApiError; exports.EvaluationsFacade = EvaluationsFacade; exports.EvaluatorCallError = EvaluatorCallError; exports.EvaluatorError = EvaluatorError; exports.EvaluatorNotFoundError = EvaluatorNotFoundError; exports.EvaluatorsApiError = EvaluatorsApiError; exports.EvaluatorsApiService = EvaluatorsApiService; exports.Experiment = Experiment; exports.ExperimentApiError = ExperimentApiError; exports.ExperimentError = ExperimentError; exports.ExperimentInitError = ExperimentInitError; exports.ExperimentsFacade = ExperimentsFacade; exports.FetchPolicy = FetchPolicy; exports.FilterableBatchSpanProcessor = _chunkIUSLT65Zjs.FilterableBatchSpanProcessor; exports.LangWatch = LangWatch; exports.LangWatchApiError = LangWatchApiError; exports.LangWatchExporter = _chunkXL6DKL2Ljs.LangWatchTraceExporter; exports.LangWatchHandledError = LangWatchHandledError; exports.TargetMetadataConflictError = TargetMetadataConflictError; exports.attributes = _chunkTKSTXX3Djs.attributes_exports; exports.getLangWatchLogger = _chunkXL6DKL2Ljs.getLangWatchLogger; exports.getLangWatchTracer = _chunkADJOFPAZjs.getLangWatchTracer; exports.isLangWatchHandledError = isLangWatchHandledError; exports.logger = logger;
|
|
5466
5466
|
//# sourceMappingURL=index.js.map
|
package/dist/index.mjs
CHANGED
|
@@ -4,10 +4,10 @@ import {
|
|
|
4
4
|
import {
|
|
5
5
|
createLangWatchSpan,
|
|
6
6
|
getLangWatchTracer
|
|
7
|
-
} from "./chunk-
|
|
7
|
+
} from "./chunk-C323F5VC.mjs";
|
|
8
8
|
import {
|
|
9
9
|
ensureSetup
|
|
10
|
-
} from "./chunk-
|
|
10
|
+
} from "./chunk-W5LSH44Z.mjs";
|
|
11
11
|
import {
|
|
12
12
|
DEFAULT_ENDPOINT,
|
|
13
13
|
LANGWATCH_SDK_LANGUAGE,
|
|
@@ -19,7 +19,7 @@ import {
|
|
|
19
19
|
buildAuthHeaders,
|
|
20
20
|
getLangWatchLogger,
|
|
21
21
|
version
|
|
22
|
-
} from "./chunk-
|
|
22
|
+
} from "./chunk-F3CCZPMR.mjs";
|
|
23
23
|
import {
|
|
24
24
|
ConsoleLogger,
|
|
25
25
|
NoOpLogger,
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
export { F as FilterableBatchSpanProcessor, L as LangWatchExporter, b as LangWatchExporterOptions, c as LangWatchLogger, L as LangWatchTraceExporter, b as LangWatchTraceExporterOptions, S as SpanProcessingExcludeRule, g as getLangWatchLogger, d as getLangWatchLoggerFromProvider, a as getLangWatchTracer, e as getLangWatchTracerFromProvider } from '../implementation-
|
|
1
|
+
export { F as FilterableBatchSpanProcessor, L as LangWatchExporter, b as LangWatchExporterOptions, c as LangWatchLogger, L as LangWatchTraceExporter, b as LangWatchTraceExporterOptions, S as SpanProcessingExcludeRule, g as getLangWatchLogger, d as getLangWatchLoggerFromProvider, a as getLangWatchTracer, e as getLangWatchTracerFromProvider } from '../implementation-CPfDot-W.mjs';
|
|
2
2
|
import { OTLPLogExporter } from '@opentelemetry/exporter-logs-otlp-http';
|
|
3
3
|
import { D as DataCaptureMode } from '../types-DLfhJb38.mjs';
|
|
4
4
|
export { a as DataCaptureConfig, b as DataCaptureContext, c as DataCaptureOptions, d as DataCapturePredicate } from '../types-DLfhJb38.mjs';
|
|
5
|
-
import { L as LangWatchSpan } from '../types-
|
|
6
|
-
export { A as AddEvaluationParams, E as EvaluationStatus, e as EvaluationTimestamps, I as INPUT_OUTPUT_TYPES, f as InputOutputType, J as JsonSerializable, g as LangWatchSpanMetrics, h as LangWatchSpanOptions, i as LangWatchSpanRAGContext, j as LangWatchTracer, S as SimpleChatMessage, k as SpanType, l as emitEvaluationEvent, s as spanTypes } from '../types-
|
|
5
|
+
import { L as LangWatchSpan } from '../types-Cw-3VUv7.mjs';
|
|
6
|
+
export { A as AddEvaluationParams, E as EvaluationStatus, e as EvaluationTimestamps, I as INPUT_OUTPUT_TYPES, f as InputOutputType, J as JsonSerializable, g as LangWatchSpanMetrics, h as LangWatchSpanOptions, i as LangWatchSpanRAGContext, j as LangWatchTracer, S as SimpleChatMessage, k as SpanType, l as emitEvaluationEvent, s as spanTypes } from '../types-Cw-3VUv7.mjs';
|
|
7
7
|
import { Span } from '@opentelemetry/api';
|
|
8
8
|
export { S as SemConvAttributeKey, a as SemConvAttributes, b as SemConvLogRecordAttributes, l as attributes } from '../types-VOZv9LYO.mjs';
|
|
9
9
|
import '@opentelemetry/sdk-trace-base';
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
export { F as FilterableBatchSpanProcessor, L as LangWatchExporter, b as LangWatchExporterOptions, c as LangWatchLogger, L as LangWatchTraceExporter, b as LangWatchTraceExporterOptions, S as SpanProcessingExcludeRule, g as getLangWatchLogger, d as getLangWatchLoggerFromProvider, a as getLangWatchTracer, e as getLangWatchTracerFromProvider } from '../implementation-
|
|
1
|
+
export { F as FilterableBatchSpanProcessor, L as LangWatchExporter, b as LangWatchExporterOptions, c as LangWatchLogger, L as LangWatchTraceExporter, b as LangWatchTraceExporterOptions, S as SpanProcessingExcludeRule, g as getLangWatchLogger, d as getLangWatchLoggerFromProvider, a as getLangWatchTracer, e as getLangWatchTracerFromProvider } from '../implementation-aYHmyVZ_.js';
|
|
2
2
|
import { OTLPLogExporter } from '@opentelemetry/exporter-logs-otlp-http';
|
|
3
3
|
import { D as DataCaptureMode } from '../types-DLfhJb38.js';
|
|
4
4
|
export { a as DataCaptureConfig, b as DataCaptureContext, c as DataCaptureOptions, d as DataCapturePredicate } from '../types-DLfhJb38.js';
|
|
5
|
-
import { L as LangWatchSpan } from '../types-
|
|
6
|
-
export { A as AddEvaluationParams, E as EvaluationStatus, e as EvaluationTimestamps, I as INPUT_OUTPUT_TYPES, f as InputOutputType, J as JsonSerializable, g as LangWatchSpanMetrics, h as LangWatchSpanOptions, i as LangWatchSpanRAGContext, j as LangWatchTracer, S as SimpleChatMessage, k as SpanType, l as emitEvaluationEvent, s as spanTypes } from '../types-
|
|
5
|
+
import { L as LangWatchSpan } from '../types-CeZ-M8JZ.js';
|
|
6
|
+
export { A as AddEvaluationParams, E as EvaluationStatus, e as EvaluationTimestamps, I as INPUT_OUTPUT_TYPES, f as InputOutputType, J as JsonSerializable, g as LangWatchSpanMetrics, h as LangWatchSpanOptions, i as LangWatchSpanRAGContext, j as LangWatchTracer, S as SimpleChatMessage, k as SpanType, l as emitEvaluationEvent, s as spanTypes } from '../types-CeZ-M8JZ.js';
|
|
7
7
|
import { Span } from '@opentelemetry/api';
|
|
8
8
|
export { S as SemConvAttributeKey, a as SemConvAttributes, b as SemConvLogRecordAttributes, l as attributes } from '../types-VOZv9LYO.js';
|
|
9
9
|
import '@opentelemetry/sdk-trace-base';
|
|
@@ -8,13 +8,13 @@ var _chunkIUSLT65Zjs = require('../chunk-IUSLT65Z.js');
|
|
|
8
8
|
|
|
9
9
|
|
|
10
10
|
|
|
11
|
-
var
|
|
11
|
+
var _chunkADJOFPAZjs = require('../chunk-ADJOFPAZ.js');
|
|
12
12
|
|
|
13
13
|
|
|
14
14
|
|
|
15
15
|
|
|
16
16
|
|
|
17
|
-
var
|
|
17
|
+
var _chunkXL6DKL2Ljs = require('../chunk-XL6DKL2L.js');
|
|
18
18
|
|
|
19
19
|
|
|
20
20
|
|
|
@@ -38,5 +38,5 @@ var _chunkTKSTXX3Djs = require('../chunk-TKSTXX3D.js');
|
|
|
38
38
|
|
|
39
39
|
|
|
40
40
|
|
|
41
|
-
exports.DataCapturePresets = _chunkIUSLT65Zjs.DataCapturePresets; exports.FilterableBatchSpanProcessor = _chunkIUSLT65Zjs.FilterableBatchSpanProcessor; exports.LangWatchExporter =
|
|
41
|
+
exports.DataCapturePresets = _chunkIUSLT65Zjs.DataCapturePresets; exports.FilterableBatchSpanProcessor = _chunkIUSLT65Zjs.FilterableBatchSpanProcessor; exports.LangWatchExporter = _chunkXL6DKL2Ljs.LangWatchTraceExporter; exports.LangWatchLogsExporter = _chunkXL6DKL2Ljs.LangWatchLogsExporter; exports.LangWatchTraceExporter = _chunkXL6DKL2Ljs.LangWatchTraceExporter; exports.attributes = _chunkTKSTXX3Djs.attributes_exports; exports.createLangWatchSpan = _chunkADJOFPAZjs.createLangWatchSpan; exports.emitEvaluationEvent = _chunkADJOFPAZjs.emitEvaluationEvent; exports.getDataCaptureMode = _chunkTKSTXX3Djs.getDataCaptureMode; exports.getLangWatchLogger = _chunkXL6DKL2Ljs.getLangWatchLogger; exports.getLangWatchLoggerFromProvider = _chunkXL6DKL2Ljs.getLangWatchLoggerFromProvider; exports.getLangWatchTracer = _chunkADJOFPAZjs.getLangWatchTracer; exports.getLangWatchTracerFromProvider = _chunkADJOFPAZjs.getLangWatchTracerFromProvider; exports.shouldCaptureInput = _chunkTKSTXX3Djs.shouldCaptureInput; exports.shouldCaptureOutput = _chunkTKSTXX3Djs.shouldCaptureOutput; exports.spanTypes = _chunkADJOFPAZjs.spanTypes;
|
|
42
42
|
//# sourceMappingURL=index.js.map
|
|
@@ -8,13 +8,13 @@ import {
|
|
|
8
8
|
getLangWatchTracer,
|
|
9
9
|
getLangWatchTracerFromProvider,
|
|
10
10
|
spanTypes
|
|
11
|
-
} from "../chunk-
|
|
11
|
+
} from "../chunk-C323F5VC.mjs";
|
|
12
12
|
import {
|
|
13
13
|
LangWatchLogsExporter,
|
|
14
14
|
LangWatchTraceExporter,
|
|
15
15
|
getLangWatchLogger,
|
|
16
16
|
getLangWatchLoggerFromProvider
|
|
17
|
-
} from "../chunk-
|
|
17
|
+
} from "../chunk-F3CCZPMR.mjs";
|
|
18
18
|
import {
|
|
19
19
|
attributes_exports,
|
|
20
20
|
getDataCaptureMode,
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import * as _opentelemetry_api from '@opentelemetry/api';
|
|
2
2
|
import { Attributes } from '@opentelemetry/api';
|
|
3
|
-
import { j as LangWatchTracer, L as LangWatchSpan, m as ChatMessage } from '../../../types-
|
|
3
|
+
import { j as LangWatchTracer, L as LangWatchSpan, m as ChatMessage } from '../../../types-Cw-3VUv7.mjs';
|
|
4
4
|
import { AgentAction, AgentFinish } from '@langchain/core/agents';
|
|
5
5
|
import { BaseCallbackHandler } from '@langchain/core/callbacks/base';
|
|
6
6
|
import { DocumentInterface } from '@langchain/core/documents';
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import * as _opentelemetry_api from '@opentelemetry/api';
|
|
2
2
|
import { Attributes } from '@opentelemetry/api';
|
|
3
|
-
import { j as LangWatchTracer, L as LangWatchSpan, m as ChatMessage } from '../../../types-
|
|
3
|
+
import { j as LangWatchTracer, L as LangWatchSpan, m as ChatMessage } from '../../../types-CeZ-M8JZ.js';
|
|
4
4
|
import { AgentAction, AgentFinish } from '@langchain/core/agents';
|
|
5
5
|
import { BaseCallbackHandler } from '@langchain/core/callbacks/base';
|
|
6
6
|
import { DocumentInterface } from '@langchain/core/documents';
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
"use strict";Object.defineProperty(exports, "__esModule", {value: true});
|
|
2
2
|
|
|
3
3
|
|
|
4
|
-
var
|
|
4
|
+
var _chunkADJOFPAZjs = require('../../../chunk-ADJOFPAZ.js');
|
|
5
5
|
|
|
6
6
|
|
|
7
7
|
|
|
@@ -29,7 +29,7 @@ var LangWatchCallbackHandler = class extends _base.BaseCallbackHandler {
|
|
|
29
29
|
constructor() {
|
|
30
30
|
super(...arguments);
|
|
31
31
|
this.name = "LangWatchCallbackHandler";
|
|
32
|
-
this.tracer =
|
|
32
|
+
this.tracer = _chunkADJOFPAZjs.getLangWatchTracer.call(void 0, "langwatch.instrumentation.langchain");
|
|
33
33
|
this.spans = {};
|
|
34
34
|
this.parentOf = {};
|
|
35
35
|
this.skipped = {};
|
|
@@ -360,7 +360,7 @@ function wrapNonScalarValues(value) {
|
|
|
360
360
|
if (value === null) return JSON.stringify(null);
|
|
361
361
|
if (typeof value === "string" || typeof value === "number" || typeof value === "boolean")
|
|
362
362
|
return value;
|
|
363
|
-
const chatMessages =
|
|
363
|
+
const chatMessages = _chunkADJOFPAZjs.chatMessageSchema.array().safeParse(value);
|
|
364
364
|
if (Array.isArray(value) && chatMessages.success) {
|
|
365
365
|
return JSON.stringify({ type: "chat_messages", value: chatMessages.data });
|
|
366
366
|
}
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
"use strict";Object.defineProperty(exports, "__esModule", {value: true});
|
|
2
2
|
|
|
3
3
|
|
|
4
|
-
var
|
|
5
|
-
require('../../../chunk-
|
|
4
|
+
var _chunkLDN74L7Rjs = require('../../../chunk-LDN74L7R.js');
|
|
5
|
+
require('../../../chunk-XL6DKL2L.js');
|
|
6
6
|
require('../../../chunk-TKSTXX3D.js');
|
|
7
7
|
|
|
8
8
|
|
|
9
9
|
|
|
10
|
-
exports.ensureSetup =
|
|
10
|
+
exports.ensureSetup = _chunkLDN74L7Rjs.ensureSetup; exports.setupObservability = _chunkLDN74L7Rjs.setupObservability;
|
|
11
11
|
//# sourceMappingURL=index.js.map
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import {
|
|
2
2
|
ensureSetup,
|
|
3
3
|
setupObservability
|
|
4
|
-
} from "../../../chunk-
|
|
5
|
-
import "../../../chunk-
|
|
4
|
+
} from "../../../chunk-W5LSH44Z.mjs";
|
|
5
|
+
import "../../../chunk-F3CCZPMR.mjs";
|
|
6
6
|
import "../../../chunk-L5KBRKHS.mjs";
|
|
7
7
|
export {
|
|
8
8
|
ensureSetup,
|
|
@@ -3,7 +3,7 @@ import { z } from 'zod';
|
|
|
3
3
|
import { a as SemConvAttributes } from './types-VOZv9LYO.js';
|
|
4
4
|
|
|
5
5
|
declare const chatMessageSchema: z.ZodObject<{
|
|
6
|
-
role: z.ZodOptional<z.ZodUnion<readonly [z.ZodLiteral<"system">, z.ZodLiteral<"user">, z.ZodLiteral<"assistant">, z.ZodLiteral<"function">, z.ZodLiteral<"tool">, z.ZodLiteral<"unknown">]>>;
|
|
6
|
+
role: z.ZodOptional<z.ZodUnion<readonly [z.ZodLiteral<"system">, z.ZodLiteral<"developer">, z.ZodLiteral<"user">, z.ZodLiteral<"assistant">, z.ZodLiteral<"function">, z.ZodLiteral<"tool">, z.ZodLiteral<"unknown">]>>;
|
|
7
7
|
content: z.ZodNullable<z.ZodOptional<z.ZodUnion<readonly [z.ZodString, z.ZodArray<z.ZodUnion<readonly [z.ZodObject<{
|
|
8
8
|
type: z.ZodLiteral<"text">;
|
|
9
9
|
text: z.ZodOptional<z.ZodString>;
|
|
@@ -195,7 +195,7 @@ type TypedValueEvaluationResult = z.infer<typeof typedValueEvaluationResultSchem
|
|
|
195
195
|
declare const typedValueChatMessagesSchema: z.ZodObject<{
|
|
196
196
|
type: z.ZodLiteral<"chat_messages">;
|
|
197
197
|
value: z.ZodArray<z.ZodObject<{
|
|
198
|
-
role: z.ZodOptional<z.ZodUnion<readonly [z.ZodLiteral<"system">, z.ZodLiteral<"user">, z.ZodLiteral<"assistant">, z.ZodLiteral<"function">, z.ZodLiteral<"tool">, z.ZodLiteral<"unknown">]>>;
|
|
198
|
+
role: z.ZodOptional<z.ZodUnion<readonly [z.ZodLiteral<"system">, z.ZodLiteral<"developer">, z.ZodLiteral<"user">, z.ZodLiteral<"assistant">, z.ZodLiteral<"function">, z.ZodLiteral<"tool">, z.ZodLiteral<"unknown">]>>;
|
|
199
199
|
content: z.ZodNullable<z.ZodOptional<z.ZodUnion<readonly [z.ZodString, z.ZodArray<z.ZodUnion<readonly [z.ZodObject<{
|
|
200
200
|
type: z.ZodLiteral<"text">;
|
|
201
201
|
text: z.ZodOptional<z.ZodString>;
|
|
@@ -3,7 +3,7 @@ import { z } from 'zod';
|
|
|
3
3
|
import { a as SemConvAttributes } from './types-VOZv9LYO.mjs';
|
|
4
4
|
|
|
5
5
|
declare const chatMessageSchema: z.ZodObject<{
|
|
6
|
-
role: z.ZodOptional<z.ZodUnion<readonly [z.ZodLiteral<"system">, z.ZodLiteral<"user">, z.ZodLiteral<"assistant">, z.ZodLiteral<"function">, z.ZodLiteral<"tool">, z.ZodLiteral<"unknown">]>>;
|
|
6
|
+
role: z.ZodOptional<z.ZodUnion<readonly [z.ZodLiteral<"system">, z.ZodLiteral<"developer">, z.ZodLiteral<"user">, z.ZodLiteral<"assistant">, z.ZodLiteral<"function">, z.ZodLiteral<"tool">, z.ZodLiteral<"unknown">]>>;
|
|
7
7
|
content: z.ZodNullable<z.ZodOptional<z.ZodUnion<readonly [z.ZodString, z.ZodArray<z.ZodUnion<readonly [z.ZodObject<{
|
|
8
8
|
type: z.ZodLiteral<"text">;
|
|
9
9
|
text: z.ZodOptional<z.ZodString>;
|
|
@@ -195,7 +195,7 @@ type TypedValueEvaluationResult = z.infer<typeof typedValueEvaluationResultSchem
|
|
|
195
195
|
declare const typedValueChatMessagesSchema: z.ZodObject<{
|
|
196
196
|
type: z.ZodLiteral<"chat_messages">;
|
|
197
197
|
value: z.ZodArray<z.ZodObject<{
|
|
198
|
-
role: z.ZodOptional<z.ZodUnion<readonly [z.ZodLiteral<"system">, z.ZodLiteral<"user">, z.ZodLiteral<"assistant">, z.ZodLiteral<"function">, z.ZodLiteral<"tool">, z.ZodLiteral<"unknown">]>>;
|
|
198
|
+
role: z.ZodOptional<z.ZodUnion<readonly [z.ZodLiteral<"system">, z.ZodLiteral<"developer">, z.ZodLiteral<"user">, z.ZodLiteral<"assistant">, z.ZodLiteral<"function">, z.ZodLiteral<"tool">, z.ZodLiteral<"unknown">]>>;
|
|
199
199
|
content: z.ZodNullable<z.ZodOptional<z.ZodUnion<readonly [z.ZodString, z.ZodArray<z.ZodUnion<readonly [z.ZodObject<{
|
|
200
200
|
type: z.ZodLiteral<"text">;
|
|
201
201
|
text: z.ZodOptional<z.ZodString>;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "langwatch",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.37.0",
|
|
4
4
|
"description": "LangWatch TypeScript/JavaScript SDK. Interact with the full LangWatch API and use the LangWatch OpenTelemetry SDK to instrument your application. For more information, see https://docs.langwatch.ai/integration/typescript/guide",
|
|
5
5
|
"main": "dist/index.js",
|
|
6
6
|
"module": "dist/index.mjs",
|