langsmith 0.10.8 → 0.10.9
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/_openapi_client/client.cjs +26 -2
- package/dist/_openapi_client/client.d.ts +15 -6
- package/dist/_openapi_client/client.js +27 -3
- package/dist/_openapi_client/internal/detect-platform.cjs +1 -1
- package/dist/_openapi_client/internal/detect-platform.js +1 -1
- package/dist/_openapi_client/resources/annotation-queues/items.cjs +13 -6
- package/dist/_openapi_client/resources/annotation-queues/items.d.ts +33 -8
- package/dist/_openapi_client/resources/annotation-queues/items.js +13 -6
- package/dist/_openapi_client/resources/datasets/datasets.cjs +9 -0
- package/dist/_openapi_client/resources/datasets/datasets.d.ts +4 -0
- package/dist/_openapi_client/resources/datasets/datasets.js +9 -0
- package/dist/_openapi_client/resources/datasets/examples.cjs +26 -0
- package/dist/_openapi_client/resources/datasets/examples.d.ts +23 -0
- package/dist/_openapi_client/resources/datasets/examples.js +22 -0
- package/dist/_openapi_client/resources/fleet/fleet.cjs +54 -0
- package/dist/_openapi_client/resources/fleet/fleet.d.ts +9 -0
- package/dist/_openapi_client/resources/fleet/fleet.js +17 -0
- package/dist/_openapi_client/resources/fleet/threads.cjs +18 -0
- package/dist/_openapi_client/resources/fleet/threads.d.ts +19 -0
- package/dist/_openapi_client/resources/fleet/threads.js +14 -0
- package/dist/_openapi_client/resources/index.cjs +8 -2
- package/dist/_openapi_client/resources/index.d.ts +6 -3
- package/dist/_openapi_client/resources/index.js +5 -2
- package/dist/_openapi_client/resources/info.d.ts +6 -0
- package/dist/_openapi_client/resources/issues.cjs +2 -2
- package/dist/_openapi_client/resources/issues.d.ts +188 -4
- package/dist/_openapi_client/resources/issues.js +2 -2
- package/dist/_openapi_client/resources/online-evaluators.cjs +7 -4
- package/dist/_openapi_client/resources/online-evaluators.d.ts +63 -4
- package/dist/_openapi_client/resources/online-evaluators.js +7 -4
- package/dist/_openapi_client/resources/product-feedback.cjs +33 -0
- package/dist/_openapi_client/resources/product-feedback.d.ts +77 -0
- package/dist/_openapi_client/resources/product-feedback.js +29 -0
- package/dist/_openapi_client/resources/runs/runs.d.ts +26 -16
- package/dist/_openapi_client/resources/sandboxes/boxes.cjs +44 -4
- package/dist/_openapi_client/resources/sandboxes/boxes.d.ts +256 -21
- package/dist/_openapi_client/resources/sandboxes/boxes.js +44 -4
- package/dist/_openapi_client/resources/sandboxes/registries.d.ts +10 -2
- package/dist/_openapi_client/resources/sandboxes/sandboxes.cjs +13 -0
- package/dist/_openapi_client/resources/sandboxes/sandboxes.d.ts +169 -14
- package/dist/_openapi_client/resources/sandboxes/sandboxes.js +13 -0
- package/dist/_openapi_client/resources/sandboxes/snapshots.cjs +10 -6
- package/dist/_openapi_client/resources/sandboxes/snapshots.d.ts +37 -6
- package/dist/_openapi_client/resources/sandboxes/snapshots.js +10 -6
- package/dist/_openapi_client/resources/sessions.cjs +23 -0
- package/dist/_openapi_client/resources/sessions.d.ts +732 -0
- package/dist/_openapi_client/resources/sessions.js +19 -0
- package/dist/_openapi_client/resources/threads/index.cjs +9 -0
- package/dist/_openapi_client/resources/threads/index.d.ts +2 -0
- package/dist/_openapi_client/resources/threads/index.js +4 -0
- package/dist/_openapi_client/resources/threads/share.cjs +61 -0
- package/dist/_openapi_client/resources/threads/share.d.ts +71 -0
- package/dist/_openapi_client/resources/threads/share.js +57 -0
- package/dist/_openapi_client/resources/threads/threads.cjs +143 -0
- package/dist/_openapi_client/resources/threads/threads.d.ts +973 -0
- package/dist/_openapi_client/resources/threads/threads.js +106 -0
- package/dist/_openapi_client/resources/threads.cjs +15 -67
- package/dist/_openapi_client/resources/threads.d.ts +1 -709
- package/dist/_openapi_client/resources/threads.js +1 -65
- package/dist/_openapi_client/resources/traces.d.ts +7 -1
- package/dist/_openapi_client/version.cjs +1 -1
- package/dist/_openapi_client/version.js +1 -1
- package/dist/address.cjs +160 -59
- package/dist/address.d.ts +59 -26
- package/dist/address.js +154 -55
- package/dist/anonymizer/index.cjs +1 -1
- package/dist/anonymizer/index.js +1 -1
- package/dist/client.cjs +39 -19
- package/dist/client.d.ts +20 -4
- package/dist/client.js +34 -14
- package/dist/index.cjs +5 -3
- package/dist/index.d.ts +2 -2
- package/dist/index.js +2 -2
- package/dist/run_trees.cjs +18 -21
- package/dist/run_trees.d.ts +4 -4
- package/dist/run_trees.js +15 -18
- package/dist/sandbox/client.cjs +33 -4
- package/dist/sandbox/client.d.ts +4 -0
- package/dist/sandbox/client.js +34 -5
- package/dist/sandbox/command_handle.cjs +8 -0
- package/dist/sandbox/command_handle.js +8 -0
- package/dist/sandbox/sandbox.cjs +7 -0
- package/dist/sandbox/sandbox.js +7 -0
- package/dist/sandbox/service_url.cjs +9 -1
- package/dist/sandbox/service_url.d.ts +2 -1
- package/dist/sandbox/service_url.js +9 -1
- package/dist/sandbox/tracing.cjs +13 -0
- package/dist/sandbox/tracing.d.ts +1 -0
- package/dist/sandbox/tracing.js +10 -0
- package/dist/schemas.d.ts +3 -3
- package/dist/traceable.cjs +5 -4
- package/dist/traceable.js +4 -3
- package/dist/utils/{agent_addressing.cjs → addressing.cjs} +20 -11
- package/dist/utils/{agent_addressing.d.ts → addressing.d.ts} +4 -6
- package/dist/utils/{agent_addressing.js → addressing.js} +21 -11
- package/dist/utils/env.cjs +6 -4
- package/dist/utils/env.js +6 -4
- package/package.json +1 -1
|
@@ -0,0 +1,106 @@
|
|
|
1
|
+
// @ts-nocheck
|
|
2
|
+
// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
|
|
3
|
+
import { APIResource } from '../../core/resource.js';
|
|
4
|
+
import * as ShareAPI from './share.js';
|
|
5
|
+
import { Share, } from './share.js';
|
|
6
|
+
import { ItemsCursorGetPagination, ItemsCursorPostPagination, } from '../../core/pagination.js';
|
|
7
|
+
import { buildHeaders } from '../../internal/headers.js';
|
|
8
|
+
import { path } from '../../internal/utils/path.js';
|
|
9
|
+
export class Threads extends APIResource {
|
|
10
|
+
constructor() {
|
|
11
|
+
super(...arguments);
|
|
12
|
+
Object.defineProperty(this, "share", {
|
|
13
|
+
enumerable: true,
|
|
14
|
+
configurable: true,
|
|
15
|
+
writable: true,
|
|
16
|
+
value: new ShareAPI.Share(this._client)
|
|
17
|
+
});
|
|
18
|
+
}
|
|
19
|
+
/**
|
|
20
|
+
* GET with body payload — no resources created. Returns aggregate statistics for
|
|
21
|
+
* threads in a tracing project. The response includes the thread counts, run
|
|
22
|
+
* counts, latency percentiles, rates, token totals, and cost totals requested in
|
|
23
|
+
* `select`.
|
|
24
|
+
*
|
|
25
|
+
* Self-hosted deployments require LangSmith `v0.17` or later.
|
|
26
|
+
*
|
|
27
|
+
* @example
|
|
28
|
+
* ```ts
|
|
29
|
+
* const response = await client.threads.aggregateStats({
|
|
30
|
+
* project_id: '0190a1b2-c3d4-7ef0-a5b6-6ea3a82e9328',
|
|
31
|
+
* select: [
|
|
32
|
+
* 'THREAD_COUNT',
|
|
33
|
+
* 'TRACE_COUNT',
|
|
34
|
+
* 'TOTAL_TOKENS',
|
|
35
|
+
* 'TOTAL_COST',
|
|
36
|
+
* ],
|
|
37
|
+
* });
|
|
38
|
+
* ```
|
|
39
|
+
*/
|
|
40
|
+
aggregateStats(body, options) {
|
|
41
|
+
return this._client.post('/api/v2/threads/stats', { body, ...options });
|
|
42
|
+
}
|
|
43
|
+
/**
|
|
44
|
+
* Retrieve all traces belonging to a specific thread within a project.
|
|
45
|
+
*
|
|
46
|
+
* Self-hosted deployments require LangSmith `v0.16` or later.
|
|
47
|
+
*
|
|
48
|
+
* @example
|
|
49
|
+
* ```ts
|
|
50
|
+
* // Automatically fetches more pages as needed.
|
|
51
|
+
* for await (const threadTrace of client.threads.listTraces(
|
|
52
|
+
* 'thread_id',
|
|
53
|
+
* { project_id: '182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e' },
|
|
54
|
+
* )) {
|
|
55
|
+
* // ...
|
|
56
|
+
* }
|
|
57
|
+
* ```
|
|
58
|
+
*/
|
|
59
|
+
listTraces(threadID, query, options) {
|
|
60
|
+
return this._client.getAPIList(path `/api/v2/threads/${threadID}/traces`, (ItemsCursorGetPagination), { query, ...options });
|
|
61
|
+
}
|
|
62
|
+
/**
|
|
63
|
+
* Query threads within a project (session), with cursor-based pagination. Returns
|
|
64
|
+
* threads matching the given time range and optional filters.
|
|
65
|
+
*
|
|
66
|
+
* Self-hosted deployments require LangSmith `v0.16` or later.
|
|
67
|
+
*
|
|
68
|
+
* @example
|
|
69
|
+
* ```ts
|
|
70
|
+
* // Automatically fetches more pages as needed.
|
|
71
|
+
* for await (const thread of client.threads.query()) {
|
|
72
|
+
* // ...
|
|
73
|
+
* }
|
|
74
|
+
* ```
|
|
75
|
+
*/
|
|
76
|
+
query(params, options) {
|
|
77
|
+
const { Accept, ...body } = params;
|
|
78
|
+
return this._client.getAPIList('/api/v2/threads/query', (ItemsCursorPostPagination), {
|
|
79
|
+
body,
|
|
80
|
+
method: 'post',
|
|
81
|
+
...options,
|
|
82
|
+
headers: buildHeaders([{ ...(Accept != null ? { Accept: Accept } : undefined) }, options?.headers]),
|
|
83
|
+
});
|
|
84
|
+
}
|
|
85
|
+
/**
|
|
86
|
+
* Compute aggregate stats for a single thread (turn count, latency percentiles,
|
|
87
|
+
* token/cost sums, and detail breakdowns) within a project.
|
|
88
|
+
*
|
|
89
|
+
* Self-hosted deployments require LangSmith `v0.16` or later.
|
|
90
|
+
*
|
|
91
|
+
* @example
|
|
92
|
+
* ```ts
|
|
93
|
+
* const threadStats = await client.threads.stats(
|
|
94
|
+
* 'thread_id',
|
|
95
|
+
* {
|
|
96
|
+
* selects: ['TURNS'],
|
|
97
|
+
* session_id: '182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e',
|
|
98
|
+
* },
|
|
99
|
+
* );
|
|
100
|
+
* ```
|
|
101
|
+
*/
|
|
102
|
+
stats(threadID, query, options) {
|
|
103
|
+
return this._client.get(path `/api/v2/threads/${threadID}/stats`, { query, ...options });
|
|
104
|
+
}
|
|
105
|
+
}
|
|
106
|
+
Threads.Share = Share;
|
|
@@ -1,71 +1,19 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
// @ts-nocheck
|
|
3
3
|
// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
|
|
4
|
-
Object.
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
class Threads extends resource_js_1.APIResource {
|
|
10
|
-
/**
|
|
11
|
-
* Retrieve all traces belonging to a specific thread within a project.
|
|
12
|
-
*
|
|
13
|
-
* Self-hosted deployments require LangSmith `v0.16` or later.
|
|
14
|
-
*
|
|
15
|
-
* @example
|
|
16
|
-
* ```ts
|
|
17
|
-
* // Automatically fetches more pages as needed.
|
|
18
|
-
* for await (const threadTrace of client.threads.listTraces(
|
|
19
|
-
* 'thread_id',
|
|
20
|
-
* { project_id: '182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e' },
|
|
21
|
-
* )) {
|
|
22
|
-
* // ...
|
|
23
|
-
* }
|
|
24
|
-
* ```
|
|
25
|
-
*/
|
|
26
|
-
listTraces(threadID, query, options) {
|
|
27
|
-
return this._client.getAPIList((0, path_js_1.path) `/api/v2/threads/${threadID}/traces`, (pagination_js_1.ItemsCursorGetPagination), { query, ...options });
|
|
28
|
-
}
|
|
29
|
-
/**
|
|
30
|
-
* Query threads within a project (session), with cursor-based pagination. Returns
|
|
31
|
-
* threads matching the given time range and optional filters.
|
|
32
|
-
*
|
|
33
|
-
* Self-hosted deployments require LangSmith `v0.16` or later.
|
|
34
|
-
*
|
|
35
|
-
* @example
|
|
36
|
-
* ```ts
|
|
37
|
-
* // Automatically fetches more pages as needed.
|
|
38
|
-
* for await (const thread of client.threads.query()) {
|
|
39
|
-
* // ...
|
|
40
|
-
* }
|
|
41
|
-
* ```
|
|
42
|
-
*/
|
|
43
|
-
query(body, options) {
|
|
44
|
-
return this._client.getAPIList('/api/v2/threads/query', (pagination_js_1.ItemsCursorPostPagination), {
|
|
45
|
-
body,
|
|
46
|
-
method: 'post',
|
|
47
|
-
...options,
|
|
48
|
-
});
|
|
4
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
5
|
+
if (k2 === undefined) k2 = k;
|
|
6
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
7
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
8
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
49
9
|
}
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
* {
|
|
61
|
-
* selects: ['TURNS'],
|
|
62
|
-
* session_id: '182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e',
|
|
63
|
-
* },
|
|
64
|
-
* );
|
|
65
|
-
* ```
|
|
66
|
-
*/
|
|
67
|
-
stats(threadID, query, options) {
|
|
68
|
-
return this._client.get((0, path_js_1.path) `/api/v2/threads/${threadID}/stats`, { query, ...options });
|
|
69
|
-
}
|
|
70
|
-
}
|
|
71
|
-
exports.Threads = Threads;
|
|
10
|
+
Object.defineProperty(o, k2, desc);
|
|
11
|
+
}) : (function(o, m, k, k2) {
|
|
12
|
+
if (k2 === undefined) k2 = k;
|
|
13
|
+
o[k2] = m[k];
|
|
14
|
+
}));
|
|
15
|
+
var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
16
|
+
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
17
|
+
};
|
|
18
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
19
|
+
__exportStar(require("./threads/index.cjs"), exports);
|