langsmith 0.7.11 → 0.7.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/dist/_openapi_client/client.cjs +8 -0
- package/dist/_openapi_client/client.d.ts +3 -0
- package/dist/_openapi_client/client.js +8 -0
- package/dist/_openapi_client/core/pagination.cjs +2 -2
- package/dist/_openapi_client/core/pagination.js +2 -2
- package/dist/_openapi_client/internal/utils/query.cjs +1 -1
- package/dist/_openapi_client/internal/utils/query.js +1 -1
- package/dist/_openapi_client/resources/datasets/runs.d.ts +2 -1
- package/dist/_openapi_client/resources/index.cjs +3 -1
- package/dist/_openapi_client/resources/index.d.ts +1 -0
- package/dist/_openapi_client/resources/index.js +1 -0
- package/dist/_openapi_client/resources/runs/index.cjs +9 -0
- package/dist/_openapi_client/resources/runs/index.d.ts +2 -0
- package/dist/_openapi_client/resources/runs/index.js +4 -0
- package/dist/_openapi_client/resources/runs/rules.cjs +9 -0
- package/dist/_openapi_client/resources/runs/rules.d.ts +3 -0
- package/dist/_openapi_client/resources/runs/rules.js +5 -0
- package/dist/_openapi_client/resources/runs/runs.cjs +115 -0
- package/dist/_openapi_client/resources/runs/runs.d.ts +800 -0
- package/dist/_openapi_client/resources/runs/runs.js +78 -0
- package/dist/_openapi_client/resources/runs.cjs +19 -0
- package/dist/_openapi_client/resources/runs.d.ts +1 -0
- package/dist/_openapi_client/resources/runs.js +3 -0
- package/dist/client.cjs +3 -0
- package/dist/client.d.ts +2 -0
- package/dist/client.js +3 -0
- package/dist/index.cjs +1 -1
- package/dist/index.d.ts +1 -1
- package/dist/index.js +1 -1
- package/dist/utils/constants.cjs +1 -1
- package/dist/utils/constants.d.ts +1 -1
- package/dist/utils/constants.js +1 -1
- package/package.json +5 -5
|
@@ -0,0 +1,78 @@
|
|
|
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 RulesAPI from './rules.js';
|
|
5
|
+
import { Rules } from './rules.js';
|
|
6
|
+
import { ItemsCursorPostPagination, } from '../../core/pagination.js';
|
|
7
|
+
import { buildHeaders } from '../../internal/headers.js';
|
|
8
|
+
import { path } from '../../internal/utils/path.js';
|
|
9
|
+
export class Runs extends APIResource {
|
|
10
|
+
constructor() {
|
|
11
|
+
super(...arguments);
|
|
12
|
+
Object.defineProperty(this, "rules", {
|
|
13
|
+
enumerable: true,
|
|
14
|
+
configurable: true,
|
|
15
|
+
writable: true,
|
|
16
|
+
value: new RulesAPI.Rules(this._client)
|
|
17
|
+
});
|
|
18
|
+
Object.defineProperty(this, "retrieve", {
|
|
19
|
+
enumerable: true,
|
|
20
|
+
configurable: true,
|
|
21
|
+
writable: true,
|
|
22
|
+
value: this.retrieveV2
|
|
23
|
+
});
|
|
24
|
+
Object.defineProperty(this, "query", {
|
|
25
|
+
enumerable: true,
|
|
26
|
+
configurable: true,
|
|
27
|
+
writable: true,
|
|
28
|
+
value: this.queryV2
|
|
29
|
+
});
|
|
30
|
+
}
|
|
31
|
+
/**
|
|
32
|
+
* **Alpha:** The request and response contract may change; Returns a paginated
|
|
33
|
+
* list of runs for the given projects within min/max start_time. Supports filters,
|
|
34
|
+
* cursor pagination, and `selects` to select fields to return.
|
|
35
|
+
*
|
|
36
|
+
* @example
|
|
37
|
+
* ```ts
|
|
38
|
+
* // Automatically fetches more pages as needed.
|
|
39
|
+
* for await (const queryRunResponse of client.runs.queryV2()) {
|
|
40
|
+
* // ...
|
|
41
|
+
* }
|
|
42
|
+
* ```
|
|
43
|
+
*/
|
|
44
|
+
queryV2(params, options) {
|
|
45
|
+
const { Accept, ...body } = params;
|
|
46
|
+
return this._client.getAPIList('/v2/runs/query', (ItemsCursorPostPagination), {
|
|
47
|
+
body,
|
|
48
|
+
method: 'post',
|
|
49
|
+
...options,
|
|
50
|
+
headers: buildHeaders([{ ...(Accept != null ? { Accept: Accept } : undefined) }, options?.headers]),
|
|
51
|
+
});
|
|
52
|
+
}
|
|
53
|
+
/**
|
|
54
|
+
* **Alpha:** The request and response contract may change; Returns one run by ID
|
|
55
|
+
* for the given session and start_time. Use the `selects` query parameter
|
|
56
|
+
* (repeatable) to select fields to return.
|
|
57
|
+
*
|
|
58
|
+
* @example
|
|
59
|
+
* ```ts
|
|
60
|
+
* const queryRunResponse = await client.runs.retrieveV2(
|
|
61
|
+
* '182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e',
|
|
62
|
+
* {
|
|
63
|
+
* project_id: '182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e',
|
|
64
|
+
* start_time: '2019-12-27T18:11:19.117Z',
|
|
65
|
+
* },
|
|
66
|
+
* );
|
|
67
|
+
* ```
|
|
68
|
+
*/
|
|
69
|
+
retrieveV2(runID, params, options) {
|
|
70
|
+
const { Accept, ...query } = params;
|
|
71
|
+
return this._client.get(path `/v2/runs/${runID}`, {
|
|
72
|
+
query,
|
|
73
|
+
...options,
|
|
74
|
+
headers: buildHeaders([{ ...(Accept != null ? { Accept: Accept } : undefined) }, options?.headers]),
|
|
75
|
+
});
|
|
76
|
+
}
|
|
77
|
+
}
|
|
78
|
+
Runs.Rules = Rules;
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
// @ts-nocheck
|
|
3
|
+
// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
|
|
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]; } };
|
|
9
|
+
}
|
|
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("./runs/index.cjs"), exports);
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './runs/index.js';
|
package/dist/client.cjs
CHANGED
package/dist/client.d.ts
CHANGED
|
@@ -4,6 +4,7 @@ import { ComparativeExperiment, DataType, Dataset, DatasetDiffInfo, DatasetShare
|
|
|
4
4
|
import { type TracingMode } from "./utils/env.js";
|
|
5
5
|
import { EvaluationResult, EvaluationResults } from "./evaluation/evaluator.js";
|
|
6
6
|
import { OnlineEvaluators } from "./_openapi_client/resources/online-evaluators.js";
|
|
7
|
+
import { Runs as OpenAPIRuns } from "./_openapi_client/resources/runs.js";
|
|
7
8
|
import { PromptCache } from "./utils/prompt_cache/index.js";
|
|
8
9
|
import { ProfileAuth } from "./utils/profiles.js";
|
|
9
10
|
export interface ClientConfig {
|
|
@@ -502,6 +503,7 @@ export declare class Client implements LangSmithTracingClientInterface {
|
|
|
502
503
|
private _newOpenAPIClient;
|
|
503
504
|
private _getPlatformEndpointPath;
|
|
504
505
|
get onlineEvaluators(): OnlineEvaluators;
|
|
506
|
+
get runs(): OpenAPIRuns;
|
|
505
507
|
private processInputs;
|
|
506
508
|
private processOutputs;
|
|
507
509
|
private processMetadata;
|
package/dist/client.js
CHANGED
|
@@ -929,6 +929,9 @@ export class Client {
|
|
|
929
929
|
get onlineEvaluators() {
|
|
930
930
|
return this.openAPIClient.onlineEvaluators;
|
|
931
931
|
}
|
|
932
|
+
get runs() {
|
|
933
|
+
return this.openAPIClient.runs;
|
|
934
|
+
}
|
|
932
935
|
async processInputs(inputs) {
|
|
933
936
|
if (this.hideInputs === false) {
|
|
934
937
|
return inputs;
|
package/dist/index.cjs
CHANGED
|
@@ -20,6 +20,6 @@ Object.defineProperty(exports, "PromptCache", { enumerable: true, get: function
|
|
|
20
20
|
Object.defineProperty(exports, "configureGlobalPromptCache", { enumerable: true, get: function () { return index_js_1.configureGlobalPromptCache; } });
|
|
21
21
|
Object.defineProperty(exports, "promptCacheSingleton", { enumerable: true, get: function () { return index_js_1.promptCacheSingleton; } });
|
|
22
22
|
// Update using pnpm bump-version
|
|
23
|
-
exports.__version__ = "0.7.
|
|
23
|
+
exports.__version__ = "0.7.12";
|
|
24
24
|
// Metadata key to hide a traced run from LangSmith's Messages View.
|
|
25
25
|
exports.LS_MESSAGE_VIEW_EXCLUDE = "ls_message_view_exclude";
|
package/dist/index.d.ts
CHANGED
|
@@ -6,5 +6,5 @@ export { getDefaultProjectName } from "./utils/project.js";
|
|
|
6
6
|
export { uuid7, uuid7FromTime } from "./uuid.js";
|
|
7
7
|
export { isTracingEnabled } from "./utils/guard.js";
|
|
8
8
|
export { Cache, PromptCache, type CacheConfig, type CacheMetrics, configureGlobalPromptCache, promptCacheSingleton, } from "./utils/prompt_cache/index.js";
|
|
9
|
-
export declare const __version__ = "0.7.
|
|
9
|
+
export declare const __version__ = "0.7.12";
|
|
10
10
|
export declare const LS_MESSAGE_VIEW_EXCLUDE: "ls_message_view_exclude";
|
package/dist/index.js
CHANGED
|
@@ -6,6 +6,6 @@ export { uuid7, uuid7FromTime } from "./uuid.js";
|
|
|
6
6
|
export { isTracingEnabled } from "./utils/guard.js";
|
|
7
7
|
export { Cache, PromptCache, configureGlobalPromptCache, promptCacheSingleton, } from "./utils/prompt_cache/index.js";
|
|
8
8
|
// Update using pnpm bump-version
|
|
9
|
-
export const __version__ = "0.7.
|
|
9
|
+
export const __version__ = "0.7.12";
|
|
10
10
|
// Metadata key to hide a traced run from LangSmith's Messages View.
|
|
11
11
|
export const LS_MESSAGE_VIEW_EXCLUDE = "ls_message_view_exclude";
|
package/dist/utils/constants.cjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export declare const _MIN_BACKEND_VERSION = "0.16.
|
|
1
|
+
export declare const _MIN_BACKEND_VERSION = "0.16.6rc1";
|
package/dist/utils/constants.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export const _MIN_BACKEND_VERSION = "0.16.
|
|
1
|
+
export const _MIN_BACKEND_VERSION = "0.16.6rc1";
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "langsmith",
|
|
3
|
-
"version": "0.7.
|
|
3
|
+
"version": "0.7.12",
|
|
4
4
|
"description": "Client library to connect to the LangSmith Observability and Evaluation Platform.",
|
|
5
5
|
"packageManager": "pnpm@10.33.0",
|
|
6
6
|
"files": [
|
|
@@ -156,9 +156,9 @@
|
|
|
156
156
|
"p-queue": "6.6.2"
|
|
157
157
|
},
|
|
158
158
|
"devDependencies": {
|
|
159
|
-
"@ai-sdk/openai": "4.0.0-
|
|
160
|
-
"@ai-sdk/provider": "4.0.0-
|
|
161
|
-
"@ai-sdk/anthropic": "4.0.0-
|
|
159
|
+
"@ai-sdk/openai": "4.0.0-beta.74",
|
|
160
|
+
"@ai-sdk/provider": "4.0.0-beta.19",
|
|
161
|
+
"@ai-sdk/anthropic": "4.0.0-beta.67",
|
|
162
162
|
"@anthropic-ai/claude-agent-sdk": "^0.3.150",
|
|
163
163
|
"@anthropic-ai/sdk": "^0.98.0",
|
|
164
164
|
"@babel/preset-env": "^7.22.4",
|
|
@@ -184,7 +184,7 @@
|
|
|
184
184
|
"@types/ws": "^8.18.1",
|
|
185
185
|
"@typescript-eslint/eslint-plugin": "^5.59.8",
|
|
186
186
|
"@typescript-eslint/parser": "^5.59.8",
|
|
187
|
-
"ai": "7.0.0-
|
|
187
|
+
"ai": "7.0.0-beta.178",
|
|
188
188
|
"babel-jest": "^30.2.0",
|
|
189
189
|
"cross-env": "^10.1.0",
|
|
190
190
|
"dotenv": "^17.3.1",
|