langsmith 0.7.9 → 0.7.11
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 +46 -15
- package/dist/_openapi_client/client.cjs +0 -88
- package/dist/_openapi_client/client.d.ts +0 -33
- package/dist/_openapi_client/client.js +0 -88
- package/dist/_openapi_client/internal/headers.d.ts +13 -0
- package/dist/_openapi_client/internal/types.d.ts +1 -28
- package/dist/_openapi_client/resources/datasets/datasets.d.ts +52 -4
- package/dist/_openapi_client/resources/datasets/runs.d.ts +1 -2
- package/dist/_openapi_client/resources/index.cjs +1 -23
- package/dist/_openapi_client/resources/index.d.ts +0 -11
- package/dist/_openapi_client/resources/index.js +0 -11
- package/dist/anonymizer/index.cjs +142 -0
- package/dist/anonymizer/index.d.ts +45 -0
- package/dist/anonymizer/index.js +140 -0
- package/dist/client.cjs +26 -1
- package/dist/client.d.ts +4 -1
- package/dist/client.js +25 -1
- package/dist/index.cjs +1 -1
- package/dist/index.d.ts +1 -1
- package/dist/index.js +1 -1
- package/dist/sandbox/client.cjs +5 -8
- package/dist/sandbox/client.js +5 -8
- package/dist/sandbox/index.cjs +2 -1
- package/dist/sandbox/index.d.ts +2 -2
- package/dist/sandbox/index.js +1 -1
- package/dist/sandbox/mounts.cjs +157 -18
- package/dist/sandbox/mounts.d.ts +10 -2
- package/dist/sandbox/mounts.js +155 -18
- package/dist/sandbox/proxy_config.cjs +19 -44
- package/dist/sandbox/proxy_config.d.ts +2 -4
- package/dist/sandbox/proxy_config.js +19 -43
- package/dist/sandbox/types.d.ts +56 -15
- package/dist/utils/constants.cjs +4 -0
- package/dist/utils/constants.d.ts +1 -0
- package/dist/utils/constants.js +1 -0
- package/package.json +2 -2
- package/dist/_openapi_client/resources/annotation-queues/annotation-queues.cjs +0 -138
- package/dist/_openapi_client/resources/annotation-queues/annotation-queues.d.ts +0 -367
- package/dist/_openapi_client/resources/annotation-queues/annotation-queues.js +0 -101
- package/dist/_openapi_client/resources/annotation-queues/runs.cjs +0 -46
- package/dist/_openapi_client/resources/annotation-queues/runs.d.ts +0 -128
- package/dist/_openapi_client/resources/annotation-queues/runs.js +0 -42
- package/dist/_openapi_client/resources/commits.cjs +0 -44
- package/dist/_openapi_client/resources/commits.d.ts +0 -204
- package/dist/_openapi_client/resources/commits.js +0 -40
- package/dist/_openapi_client/resources/evaluators.cjs +0 -15
- package/dist/_openapi_client/resources/evaluators.d.ts +0 -125
- package/dist/_openapi_client/resources/evaluators.js +0 -11
- package/dist/_openapi_client/resources/examples/bulk.cjs +0 -24
- package/dist/_openapi_client/resources/examples/bulk.d.ts +0 -78
- package/dist/_openapi_client/resources/examples/bulk.js +0 -20
- package/dist/_openapi_client/resources/examples/examples.cjs +0 -124
- package/dist/_openapi_client/resources/examples/examples.d.ts +0 -182
- package/dist/_openapi_client/resources/examples/examples.js +0 -87
- package/dist/_openapi_client/resources/examples/validate.cjs +0 -21
- package/dist/_openapi_client/resources/examples/validate.d.ts +0 -38
- package/dist/_openapi_client/resources/examples/validate.js +0 -17
- package/dist/_openapi_client/resources/feedback/configs.cjs +0 -24
- package/dist/_openapi_client/resources/feedback/configs.d.ts +0 -18
- package/dist/_openapi_client/resources/feedback/configs.js +0 -20
- package/dist/_openapi_client/resources/feedback/feedback.cjs +0 -98
- package/dist/_openapi_client/resources/feedback/feedback.d.ts +0 -275
- package/dist/_openapi_client/resources/feedback/feedback.js +0 -61
- package/dist/_openapi_client/resources/feedback/tokens.cjs +0 -35
- package/dist/_openapi_client/resources/feedback/tokens.d.ts +0 -130
- package/dist/_openapi_client/resources/feedback/tokens.js +0 -31
- package/dist/_openapi_client/resources/public/datasets.cjs +0 -47
- package/dist/_openapi_client/resources/public/datasets.d.ts +0 -152
- package/dist/_openapi_client/resources/public/datasets.js +0 -43
- package/dist/_openapi_client/resources/public/public.cjs +0 -62
- package/dist/_openapi_client/resources/public/public.d.ts +0 -32
- package/dist/_openapi_client/resources/public/public.js +0 -25
- package/dist/_openapi_client/resources/repos/directories.cjs +0 -40
- package/dist/_openapi_client/resources/repos/directories.d.ts +0 -72
- package/dist/_openapi_client/resources/repos/directories.js +0 -36
- package/dist/_openapi_client/resources/repos/repos.cjs +0 -93
- package/dist/_openapi_client/resources/repos/repos.d.ts +0 -188
- package/dist/_openapi_client/resources/repos/repos.js +0 -56
- package/dist/_openapi_client/resources/runs/rules.cjs +0 -9
- package/dist/_openapi_client/resources/runs/rules.d.ts +0 -3
- package/dist/_openapi_client/resources/runs/rules.js +0 -5
- package/dist/_openapi_client/resources/runs/runs.cjs +0 -102
- package/dist/_openapi_client/resources/runs/runs.d.ts +0 -542
- package/dist/_openapi_client/resources/runs/runs.js +0 -65
- package/dist/_openapi_client/resources/sandboxes/boxes.cjs +0 -86
- package/dist/_openapi_client/resources/sandboxes/boxes.d.ts +0 -1121
- package/dist/_openapi_client/resources/sandboxes/boxes.js +0 -82
- package/dist/_openapi_client/resources/sandboxes/sandboxes.cjs +0 -63
- package/dist/_openapi_client/resources/sandboxes/sandboxes.d.ts +0 -13
- package/dist/_openapi_client/resources/sandboxes/sandboxes.js +0 -26
- package/dist/_openapi_client/resources/sandboxes/snapshots.cjs +0 -39
- package/dist/_openapi_client/resources/sandboxes/snapshots.d.ts +0 -130
- package/dist/_openapi_client/resources/sandboxes/snapshots.js +0 -35
- package/dist/_openapi_client/resources/settings.cjs +0 -15
- package/dist/_openapi_client/resources/settings.d.ts +0 -18
- package/dist/_openapi_client/resources/settings.js +0 -11
- package/dist/_openapi_client/resources/workspaces.cjs +0 -35
- package/dist/_openapi_client/resources/workspaces.d.ts +0 -84
- package/dist/_openapi_client/resources/workspaces.js +0 -31
package/README.md
CHANGED
|
@@ -76,7 +76,7 @@ Plaintext AWS credential values are not accepted directly; wrap them as
|
|
|
76
76
|
|
|
77
77
|
When sandbox code needs to call Google APIs, use the sandbox GCP auth proxy.
|
|
78
78
|
The proxy keeps the service account JSON outside the sandbox and injects OAuth
|
|
79
|
-
bearer tokens for
|
|
79
|
+
bearer tokens for Google API hosts matched automatically by the sandbox proxy.
|
|
80
80
|
|
|
81
81
|
Store the service account JSON as a LangSmith workspace secret. Then create the
|
|
82
82
|
sandbox with a GCP auth proxy config:
|
|
@@ -115,17 +115,18 @@ try {
|
|
|
115
115
|
Use `opaqueSecret("...")` for short-lived write-only service account JSON.
|
|
116
116
|
Plaintext service account JSON is not accepted directly.
|
|
117
117
|
|
|
118
|
-
## Sandbox
|
|
118
|
+
## Sandbox Mounts
|
|
119
119
|
|
|
120
|
-
When you create a LangSmith sandbox that needs filesystem access to
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
120
|
+
When you create a LangSmith sandbox that needs filesystem access to external
|
|
121
|
+
data such as object storage buckets or public Git repositories, pass a
|
|
122
|
+
`mountConfig` on sandbox creation. Mount specs contain only the mount target.
|
|
123
|
+
Provider credentials stay in `mountConfig.auth`; the backend expands them into
|
|
124
|
+
runtime proxy auth rules. You can also pass `proxyConfig` for non-mount proxy
|
|
125
|
+
behavior such as custom headers, callbacks, access control, and generic egress
|
|
126
|
+
rules. Explicit AWS/GCP proxy auth rules conflict with `mountConfig` auth for
|
|
127
|
+
the same provider.
|
|
127
128
|
|
|
128
|
-
S3 mounts require
|
|
129
|
+
S3 mounts require AWS auth:
|
|
129
130
|
|
|
130
131
|
```ts
|
|
131
132
|
import {
|
|
@@ -169,10 +170,7 @@ try {
|
|
|
169
170
|
}
|
|
170
171
|
```
|
|
171
172
|
|
|
172
|
-
GCS mounts require
|
|
173
|
-
`storage.googleapis.com` and `www.googleapis.com`. Read/write mounts require
|
|
174
|
-
`devstorage.read_write` or `cloud-platform`; read-only mounts can also use
|
|
175
|
-
`devstorage.read_only`.
|
|
173
|
+
GCS mounts require GCP auth:
|
|
176
174
|
|
|
177
175
|
```ts
|
|
178
176
|
import {
|
|
@@ -186,7 +184,6 @@ const mountCfg = mountConfig({
|
|
|
186
184
|
auth: [
|
|
187
185
|
gcpAuth({
|
|
188
186
|
serviceAccountJson: workspaceSecret("SANDBOX_GCP_SERVICE_ACCOUNT_JSON"),
|
|
189
|
-
scopes: ["https://www.googleapis.com/auth/devstorage.read_write"],
|
|
190
187
|
}),
|
|
191
188
|
],
|
|
192
189
|
mounts: [
|
|
@@ -212,6 +209,40 @@ try {
|
|
|
212
209
|
}
|
|
213
210
|
```
|
|
214
211
|
|
|
212
|
+
Public Git mounts do not require AWS or GCP auth:
|
|
213
|
+
|
|
214
|
+
```ts
|
|
215
|
+
import { gitMount, mountConfig } from "langsmith/sandbox";
|
|
216
|
+
|
|
217
|
+
const mountCfg = mountConfig({
|
|
218
|
+
mounts: [
|
|
219
|
+
gitMount({
|
|
220
|
+
id: "repo",
|
|
221
|
+
mountPath: "/mnt/repo",
|
|
222
|
+
remoteUrl: "https://github.com/langchain-ai/langsmith-sdk.git",
|
|
223
|
+
ref: { type: "branch", name: "main" },
|
|
224
|
+
refreshIntervalSeconds: 60,
|
|
225
|
+
}),
|
|
226
|
+
],
|
|
227
|
+
});
|
|
228
|
+
|
|
229
|
+
const sandbox = await client.createSandbox({
|
|
230
|
+
name: "git-mount-sandbox",
|
|
231
|
+
mountConfig: mountCfg,
|
|
232
|
+
});
|
|
233
|
+
|
|
234
|
+
try {
|
|
235
|
+
const result = await sandbox.run("ls /mnt/repo");
|
|
236
|
+
console.log(result.stdout);
|
|
237
|
+
} finally {
|
|
238
|
+
await sandbox.delete();
|
|
239
|
+
}
|
|
240
|
+
```
|
|
241
|
+
|
|
242
|
+
Private Git repositories can use low-level `proxyConfig` rules when the remote
|
|
243
|
+
requires proxy-managed auth. There is not yet a high-level private Git auth
|
|
244
|
+
helper.
|
|
245
|
+
|
|
215
246
|
## 1. Connect to LangSmith
|
|
216
247
|
|
|
217
248
|
Sign up for [LangSmith](https://smith.langchain.com/) using your GitHub, Discord accounts, or an email address and password. If you sign up with an email, make sure to verify your email address before logging in.
|
|
@@ -62,20 +62,9 @@ const Pagination = __importStar(require("./core/pagination.cjs"));
|
|
|
62
62
|
const Uploads = __importStar(require("./core/uploads.cjs"));
|
|
63
63
|
const API = __importStar(require("./resources/index.cjs"));
|
|
64
64
|
const api_promise_js_1 = require("./core/api-promise.cjs");
|
|
65
|
-
const commits_js_1 = require("./resources/commits.cjs");
|
|
66
|
-
const evaluators_js_1 = require("./resources/evaluators.cjs");
|
|
67
65
|
const info_js_1 = require("./resources/info.cjs");
|
|
68
66
|
const online_evaluators_js_1 = require("./resources/online-evaluators.cjs");
|
|
69
|
-
const settings_js_1 = require("./resources/settings.cjs");
|
|
70
|
-
const workspaces_js_1 = require("./resources/workspaces.cjs");
|
|
71
|
-
const annotation_queues_js_1 = require("./resources/annotation-queues/annotation-queues.cjs");
|
|
72
67
|
const datasets_js_1 = require("./resources/datasets/datasets.cjs");
|
|
73
|
-
const examples_js_1 = require("./resources/examples/examples.cjs");
|
|
74
|
-
const feedback_js_1 = require("./resources/feedback/feedback.cjs");
|
|
75
|
-
const public_js_1 = require("./resources/public/public.cjs");
|
|
76
|
-
const repos_js_1 = require("./resources/repos/repos.cjs");
|
|
77
|
-
const runs_js_1 = require("./resources/runs/runs.cjs");
|
|
78
|
-
const sandboxes_js_1 = require("./resources/sandboxes/sandboxes.cjs");
|
|
79
68
|
const sessions_js_1 = require("./resources/sessions/sessions.cjs");
|
|
80
69
|
const headers_js_1 = require("./internal/headers.cjs");
|
|
81
70
|
const env_js_1 = require("./internal/utils/env.cjs");
|
|
@@ -173,90 +162,24 @@ class Langsmith {
|
|
|
173
162
|
writable: true,
|
|
174
163
|
value: new API.Sessions(this)
|
|
175
164
|
});
|
|
176
|
-
Object.defineProperty(this, "examples", {
|
|
177
|
-
enumerable: true,
|
|
178
|
-
configurable: true,
|
|
179
|
-
writable: true,
|
|
180
|
-
value: new API.Examples(this)
|
|
181
|
-
});
|
|
182
165
|
Object.defineProperty(this, "datasets", {
|
|
183
166
|
enumerable: true,
|
|
184
167
|
configurable: true,
|
|
185
168
|
writable: true,
|
|
186
169
|
value: new API.Datasets(this)
|
|
187
170
|
});
|
|
188
|
-
Object.defineProperty(this, "runs", {
|
|
189
|
-
enumerable: true,
|
|
190
|
-
configurable: true,
|
|
191
|
-
writable: true,
|
|
192
|
-
value: new API.Runs(this)
|
|
193
|
-
});
|
|
194
|
-
Object.defineProperty(this, "evaluators", {
|
|
195
|
-
enumerable: true,
|
|
196
|
-
configurable: true,
|
|
197
|
-
writable: true,
|
|
198
|
-
value: new API.Evaluators(this)
|
|
199
|
-
});
|
|
200
171
|
Object.defineProperty(this, "onlineEvaluators", {
|
|
201
172
|
enumerable: true,
|
|
202
173
|
configurable: true,
|
|
203
174
|
writable: true,
|
|
204
175
|
value: new API.OnlineEvaluators(this)
|
|
205
176
|
});
|
|
206
|
-
Object.defineProperty(this, "feedback", {
|
|
207
|
-
enumerable: true,
|
|
208
|
-
configurable: true,
|
|
209
|
-
writable: true,
|
|
210
|
-
value: new API.Feedback(this)
|
|
211
|
-
});
|
|
212
|
-
Object.defineProperty(this, "public", {
|
|
213
|
-
enumerable: true,
|
|
214
|
-
configurable: true,
|
|
215
|
-
writable: true,
|
|
216
|
-
value: new API.Public(this)
|
|
217
|
-
});
|
|
218
|
-
Object.defineProperty(this, "annotationQueues", {
|
|
219
|
-
enumerable: true,
|
|
220
|
-
configurable: true,
|
|
221
|
-
writable: true,
|
|
222
|
-
value: new API.AnnotationQueues(this)
|
|
223
|
-
});
|
|
224
177
|
Object.defineProperty(this, "info", {
|
|
225
178
|
enumerable: true,
|
|
226
179
|
configurable: true,
|
|
227
180
|
writable: true,
|
|
228
181
|
value: new API.Info(this)
|
|
229
182
|
});
|
|
230
|
-
Object.defineProperty(this, "workspaces", {
|
|
231
|
-
enumerable: true,
|
|
232
|
-
configurable: true,
|
|
233
|
-
writable: true,
|
|
234
|
-
value: new API.Workspaces(this)
|
|
235
|
-
});
|
|
236
|
-
Object.defineProperty(this, "repos", {
|
|
237
|
-
enumerable: true,
|
|
238
|
-
configurable: true,
|
|
239
|
-
writable: true,
|
|
240
|
-
value: new API.Repos(this)
|
|
241
|
-
});
|
|
242
|
-
Object.defineProperty(this, "commits", {
|
|
243
|
-
enumerable: true,
|
|
244
|
-
configurable: true,
|
|
245
|
-
writable: true,
|
|
246
|
-
value: new API.Commits(this)
|
|
247
|
-
});
|
|
248
|
-
Object.defineProperty(this, "settings", {
|
|
249
|
-
enumerable: true,
|
|
250
|
-
configurable: true,
|
|
251
|
-
writable: true,
|
|
252
|
-
value: new API.Settings(this)
|
|
253
|
-
});
|
|
254
|
-
Object.defineProperty(this, "sandboxes", {
|
|
255
|
-
enumerable: true,
|
|
256
|
-
configurable: true,
|
|
257
|
-
writable: true,
|
|
258
|
-
value: new API.Sandboxes(this)
|
|
259
|
-
});
|
|
260
183
|
const options = {
|
|
261
184
|
apiKey,
|
|
262
185
|
tenantID,
|
|
@@ -798,17 +721,6 @@ Object.defineProperty(Langsmith, "toFile", {
|
|
|
798
721
|
value: Uploads.toFile
|
|
799
722
|
});
|
|
800
723
|
Langsmith.Sessions = sessions_js_1.Sessions;
|
|
801
|
-
Langsmith.Examples = examples_js_1.Examples;
|
|
802
724
|
Langsmith.Datasets = datasets_js_1.Datasets;
|
|
803
|
-
Langsmith.Runs = runs_js_1.Runs;
|
|
804
|
-
Langsmith.Evaluators = evaluators_js_1.Evaluators;
|
|
805
725
|
Langsmith.OnlineEvaluators = online_evaluators_js_1.OnlineEvaluators;
|
|
806
|
-
Langsmith.Feedback = feedback_js_1.Feedback;
|
|
807
|
-
Langsmith.Public = public_js_1.Public;
|
|
808
|
-
Langsmith.AnnotationQueues = annotation_queues_js_1.AnnotationQueues;
|
|
809
726
|
Langsmith.Info = info_js_1.Info;
|
|
810
|
-
Langsmith.Workspaces = workspaces_js_1.Workspaces;
|
|
811
|
-
Langsmith.Repos = repos_js_1.Repos;
|
|
812
|
-
Langsmith.Commits = commits_js_1.Commits;
|
|
813
|
-
Langsmith.Settings = settings_js_1.Settings;
|
|
814
|
-
Langsmith.Sandboxes = sandboxes_js_1.Sandboxes;
|
|
@@ -8,20 +8,9 @@ import { type CursorPaginationParams, CursorPaginationResponse, type ItemsCursor
|
|
|
8
8
|
import * as Uploads from './core/uploads.js';
|
|
9
9
|
import * as API from './resources/index.js';
|
|
10
10
|
import { APIPromise } from './core/api-promise.js';
|
|
11
|
-
import { CommitCreateParams, CommitCreateResponse, CommitListParams, CommitManifestResponse, CommitRetrieveParams, CommitRetrieveResponse, CommitWithLookups, CommitWithLookupsOffsetPaginationCommits, Commits } from './resources/commits.js';
|
|
12
|
-
import { CodeEvaluatorTopLevel, Evaluator, EvaluatorListParams, EvaluatorListResponse, EvaluatorPagerdutyAlert, EvaluatorTopLevel, EvaluatorWebhook, Evaluators } from './resources/evaluators.js';
|
|
13
11
|
import { Info, InfoListResponse } from './resources/info.js';
|
|
14
12
|
import { BulkDeleteEvaluatorFailedItem, BulkDeleteEvaluatorsResponse, CreateOnlineCodeEvaluatorRequest, CreateOnlineEvaluatorRequest, CreateOnlineEvaluatorResponse, CreateOnlineLlmEvaluatorRequest, GetOnlineEvaluatorSpendResponse, OnlineCodeEvaluator, OnlineEvaluator, OnlineEvaluatorBulkDeleteParams, OnlineEvaluatorCreateParams, OnlineEvaluatorDeleteParams, OnlineEvaluatorListParams, OnlineEvaluatorRunRule, OnlineEvaluatorSpendDay, OnlineEvaluatorSpendGroup, OnlineEvaluatorSpendParams, OnlineEvaluatorType, OnlineEvaluatorUpdateParams, OnlineEvaluators, OnlineEvaluatorsOffsetPaginationOnlineEvaluators, OnlineLlmEvaluator, OnlineSpendLimit, UpdateOnlineCodeEvaluatorRequest, UpdateOnlineEvaluatorRequest, UpdateOnlineEvaluatorResponse, UpdateOnlineLlmEvaluatorRequest } from './resources/online-evaluators.js';
|
|
15
|
-
import { AppHubCrudTenantsTenant, Settings } from './resources/settings.js';
|
|
16
|
-
import { WorkspaceCreateParams, WorkspaceCreateResponse, WorkspaceDeleteResponse, WorkspaceListParams, WorkspaceListResponse, WorkspaceUpdateParams, WorkspaceUpdateResponse, Workspaces } from './resources/workspaces.js';
|
|
17
|
-
import { AnnotationQueueAnnotationQueuesParams, AnnotationQueueCreateRunStatusParams, AnnotationQueueCreateRunStatusResponse, AnnotationQueueDeleteResponse, AnnotationQueueExportParams, AnnotationQueueExportResponse, AnnotationQueuePopulateParams, AnnotationQueuePopulateResponse, AnnotationQueueRetrieveAnnotationQueuesParams, AnnotationQueueRetrieveAnnotationQueuesResponse, AnnotationQueueRetrieveAnnotationQueuesResponsesOffsetPaginationTopLevelArray, AnnotationQueueRetrieveQueuesResponse, AnnotationQueueRetrieveResponse, AnnotationQueueRetrieveRunParams, AnnotationQueueRetrieveSizeParams, AnnotationQueueRetrieveTotalArchivedParams, AnnotationQueueRubricItemSchema, AnnotationQueueSchema, AnnotationQueueSizeSchema, AnnotationQueueUpdateParams, AnnotationQueueUpdateResponse, AnnotationQueues, RunSchemaWithAnnotationQueueInfo } from './resources/annotation-queues/annotation-queues.js';
|
|
18
13
|
import { DataType, Dataset, DatasetCloneParams, DatasetCloneResponse, DatasetCreateParams, DatasetDeleteResponse, DatasetListParams, DatasetRetrieveCsvParams, DatasetRetrieveCsvResponse, DatasetRetrieveJSONLParams, DatasetRetrieveJSONLResponse, DatasetRetrieveOpenAIFtParams, DatasetRetrieveOpenAIFtResponse, DatasetRetrieveOpenAIParams, DatasetRetrieveOpenAIResponse, DatasetRetrieveVersionParams, DatasetTransformation, DatasetUpdateParams, DatasetUpdateResponse, DatasetUpdateTagsParams, DatasetUploadParams, DatasetVersion, Datasets, DatasetsOffsetPaginationTopLevelArray, FeedbackCreateCoreSchema, Missing, SortByDatasetColumn } from './resources/datasets/datasets.js';
|
|
19
|
-
import { AttachmentsOperations, Example, ExampleCreateParams, ExampleDeleteAllParams, ExampleDeleteAllResponse, ExampleDeleteResponse, ExampleListParams, ExampleRetrieveCountParams, ExampleRetrieveCountResponse, ExampleRetrieveParams, ExampleSelect, ExampleUpdateParams, ExampleUpdateResponse, ExampleUploadFromCsvParams, ExampleUploadFromCsvResponse, Examples, ExamplesOffsetPaginationTopLevelArray } from './resources/examples/examples.js';
|
|
20
|
-
import { APIFeedbackSource, AppFeedbackSource, AutoEvalFeedbackSource, Feedback, FeedbackCreateParams, FeedbackCreateSchema, FeedbackDeleteResponse, FeedbackLevel, FeedbackListParams, FeedbackRetrieveParams, FeedbackSchema, FeedbackSchemasOffsetPaginationTopLevelArray, FeedbackUpdateParams, ModelFeedbackSource, SourceType } from './resources/feedback/feedback.js';
|
|
21
|
-
import { Public, PublicRetrieveFeedbacksParams } from './resources/public/public.js';
|
|
22
|
-
import { CreateRepoResponse, DemoConfig, EPromptOptimizationAlgorithm, GetRepoResponse, PromptimConfig, RepoCreateParams, RepoDeleteParams, RepoDeleteResponse, RepoListParams, RepoRetrieveParams, RepoUpdateParams, RepoWithLookups, RepoWithLookupsOffsetPaginationRepos, Repos } from './resources/repos/repos.js';
|
|
23
|
-
import { BodyParamsForRunSchema, RequestBodyForRunsGenerateQuery, ResponseBodyForRunsGenerateQuery, Run, RunCreateParams, RunCreateResponse, RunIngestBatchParams, RunIngestBatchResponse, RunQueryParams, RunQueryResponse, RunRetrieveParams, RunSchema, RunStatsParams, RunStatsQueryParams, RunStatsResponse, RunTypeEnum, RunUpdate2Response, RunUpdateParams, RunUpdateResponse, Runs, RunsFilterDataSourceTypeEnum } from './resources/runs/runs.js';
|
|
24
|
-
import { Sandboxes } from './resources/sandboxes/sandboxes.js';
|
|
25
14
|
import { CustomChartsSection, CustomChartsSectionRequest, RunStatsGroupBy, SessionCreateParams, SessionDashboardParams, SessionDeleteResponse, SessionListParams, SessionRetrieveParams, SessionSortableColumns, SessionUpdateParams, Sessions, TimedeltaInput, TracerSession, TracerSessionWithoutVirtualFields, TracerSessionsOffsetPaginationTopLevelArray } from './resources/sessions/sessions.js';
|
|
26
15
|
import { type Fetch } from './internal/builtin-types.js';
|
|
27
16
|
import { HeadersLike, NullableHeaders } from './internal/headers.js';
|
|
@@ -196,20 +185,9 @@ export declare class Langsmith {
|
|
|
196
185
|
static UnprocessableEntityError: typeof Errors.UnprocessableEntityError;
|
|
197
186
|
static toFile: typeof Uploads.toFile;
|
|
198
187
|
sessions: API.Sessions;
|
|
199
|
-
examples: API.Examples;
|
|
200
188
|
datasets: API.Datasets;
|
|
201
|
-
runs: API.Runs;
|
|
202
|
-
evaluators: API.Evaluators;
|
|
203
189
|
onlineEvaluators: API.OnlineEvaluators;
|
|
204
|
-
feedback: API.Feedback;
|
|
205
|
-
public: API.Public;
|
|
206
|
-
annotationQueues: API.AnnotationQueues;
|
|
207
190
|
info: API.Info;
|
|
208
|
-
workspaces: API.Workspaces;
|
|
209
|
-
repos: API.Repos;
|
|
210
|
-
commits: API.Commits;
|
|
211
|
-
settings: API.Settings;
|
|
212
|
-
sandboxes: API.Sandboxes;
|
|
213
191
|
}
|
|
214
192
|
export declare namespace Langsmith {
|
|
215
193
|
export type RequestOptions = Opts.RequestOptions;
|
|
@@ -230,18 +208,7 @@ export declare namespace Langsmith {
|
|
|
230
208
|
export import ItemsCursorGetPagination = Pagination.ItemsCursorGetPagination;
|
|
231
209
|
export { type ItemsCursorGetPaginationParams as ItemsCursorGetPaginationParams, type ItemsCursorGetPaginationResponse as ItemsCursorGetPaginationResponse, };
|
|
232
210
|
export { Sessions as Sessions, type CustomChartsSection as CustomChartsSection, type CustomChartsSectionRequest as CustomChartsSectionRequest, type RunStatsGroupBy as RunStatsGroupBy, type SessionSortableColumns as SessionSortableColumns, type TimedeltaInput as TimedeltaInput, type TracerSession as TracerSession, type TracerSessionWithoutVirtualFields as TracerSessionWithoutVirtualFields, type SessionDeleteResponse as SessionDeleteResponse, type TracerSessionsOffsetPaginationTopLevelArray as TracerSessionsOffsetPaginationTopLevelArray, type SessionCreateParams as SessionCreateParams, type SessionRetrieveParams as SessionRetrieveParams, type SessionUpdateParams as SessionUpdateParams, type SessionListParams as SessionListParams, type SessionDashboardParams as SessionDashboardParams, };
|
|
233
|
-
export { Examples as Examples, type AttachmentsOperations as AttachmentsOperations, type Example as Example, type ExampleSelect as ExampleSelect, type ExampleUpdateResponse as ExampleUpdateResponse, type ExampleDeleteResponse as ExampleDeleteResponse, type ExampleDeleteAllResponse as ExampleDeleteAllResponse, type ExampleRetrieveCountResponse as ExampleRetrieveCountResponse, type ExampleUploadFromCsvResponse as ExampleUploadFromCsvResponse, type ExamplesOffsetPaginationTopLevelArray as ExamplesOffsetPaginationTopLevelArray, type ExampleCreateParams as ExampleCreateParams, type ExampleRetrieveParams as ExampleRetrieveParams, type ExampleUpdateParams as ExampleUpdateParams, type ExampleListParams as ExampleListParams, type ExampleDeleteAllParams as ExampleDeleteAllParams, type ExampleRetrieveCountParams as ExampleRetrieveCountParams, type ExampleUploadFromCsvParams as ExampleUploadFromCsvParams, };
|
|
234
211
|
export { Datasets as Datasets, type DataType as DataType, type Dataset as Dataset, type DatasetTransformation as DatasetTransformation, type DatasetVersion as DatasetVersion, type FeedbackCreateCoreSchema as FeedbackCreateCoreSchema, type Missing as Missing, type SortByDatasetColumn as SortByDatasetColumn, type DatasetUpdateResponse as DatasetUpdateResponse, type DatasetDeleteResponse as DatasetDeleteResponse, type DatasetCloneResponse as DatasetCloneResponse, type DatasetRetrieveCsvResponse as DatasetRetrieveCsvResponse, type DatasetRetrieveJSONLResponse as DatasetRetrieveJSONLResponse, type DatasetRetrieveOpenAIResponse as DatasetRetrieveOpenAIResponse, type DatasetRetrieveOpenAIFtResponse as DatasetRetrieveOpenAIFtResponse, type DatasetsOffsetPaginationTopLevelArray as DatasetsOffsetPaginationTopLevelArray, type DatasetCreateParams as DatasetCreateParams, type DatasetUpdateParams as DatasetUpdateParams, type DatasetListParams as DatasetListParams, type DatasetCloneParams as DatasetCloneParams, type DatasetRetrieveCsvParams as DatasetRetrieveCsvParams, type DatasetRetrieveJSONLParams as DatasetRetrieveJSONLParams, type DatasetRetrieveOpenAIParams as DatasetRetrieveOpenAIParams, type DatasetRetrieveOpenAIFtParams as DatasetRetrieveOpenAIFtParams, type DatasetRetrieveVersionParams as DatasetRetrieveVersionParams, type DatasetUpdateTagsParams as DatasetUpdateTagsParams, type DatasetUploadParams as DatasetUploadParams, };
|
|
235
|
-
export { Runs as Runs, type BodyParamsForRunSchema as BodyParamsForRunSchema, type RequestBodyForRunsGenerateQuery as RequestBodyForRunsGenerateQuery, type ResponseBodyForRunsGenerateQuery as ResponseBodyForRunsGenerateQuery, type Run as Run, type RunSchema as RunSchema, type RunStatsQueryParams as RunStatsQueryParams, type RunTypeEnum as RunTypeEnum, type RunsFilterDataSourceTypeEnum as RunsFilterDataSourceTypeEnum, type RunCreateResponse as RunCreateResponse, type RunUpdateResponse as RunUpdateResponse, type RunIngestBatchResponse as RunIngestBatchResponse, type RunQueryResponse as RunQueryResponse, type RunStatsResponse as RunStatsResponse, type RunUpdate2Response as RunUpdate2Response, type RunCreateParams as RunCreateParams, type RunRetrieveParams as RunRetrieveParams, type RunUpdateParams as RunUpdateParams, type RunIngestBatchParams as RunIngestBatchParams, type RunQueryParams as RunQueryParams, type RunStatsParams as RunStatsParams, };
|
|
236
|
-
export { Evaluators as Evaluators, type CodeEvaluatorTopLevel as CodeEvaluatorTopLevel, type Evaluator as Evaluator, type EvaluatorPagerdutyAlert as EvaluatorPagerdutyAlert, type EvaluatorTopLevel as EvaluatorTopLevel, type EvaluatorWebhook as EvaluatorWebhook, type EvaluatorListResponse as EvaluatorListResponse, type EvaluatorListParams as EvaluatorListParams, };
|
|
237
212
|
export { OnlineEvaluators as OnlineEvaluators, type BulkDeleteEvaluatorFailedItem as BulkDeleteEvaluatorFailedItem, type BulkDeleteEvaluatorsResponse as BulkDeleteEvaluatorsResponse, type CreateOnlineCodeEvaluatorRequest as CreateOnlineCodeEvaluatorRequest, type CreateOnlineEvaluatorRequest as CreateOnlineEvaluatorRequest, type CreateOnlineEvaluatorResponse as CreateOnlineEvaluatorResponse, type CreateOnlineLlmEvaluatorRequest as CreateOnlineLlmEvaluatorRequest, type GetOnlineEvaluatorSpendResponse as GetOnlineEvaluatorSpendResponse, type OnlineCodeEvaluator as OnlineCodeEvaluator, type OnlineEvaluator as OnlineEvaluator, type OnlineEvaluatorRunRule as OnlineEvaluatorRunRule, type OnlineEvaluatorSpendDay as OnlineEvaluatorSpendDay, type OnlineEvaluatorSpendGroup as OnlineEvaluatorSpendGroup, type OnlineEvaluatorType as OnlineEvaluatorType, type OnlineLlmEvaluator as OnlineLlmEvaluator, type OnlineSpendLimit as OnlineSpendLimit, type UpdateOnlineCodeEvaluatorRequest as UpdateOnlineCodeEvaluatorRequest, type UpdateOnlineEvaluatorRequest as UpdateOnlineEvaluatorRequest, type UpdateOnlineEvaluatorResponse as UpdateOnlineEvaluatorResponse, type UpdateOnlineLlmEvaluatorRequest as UpdateOnlineLlmEvaluatorRequest, type OnlineEvaluatorsOffsetPaginationOnlineEvaluators as OnlineEvaluatorsOffsetPaginationOnlineEvaluators, type OnlineEvaluatorCreateParams as OnlineEvaluatorCreateParams, type OnlineEvaluatorUpdateParams as OnlineEvaluatorUpdateParams, type OnlineEvaluatorListParams as OnlineEvaluatorListParams, type OnlineEvaluatorDeleteParams as OnlineEvaluatorDeleteParams, type OnlineEvaluatorBulkDeleteParams as OnlineEvaluatorBulkDeleteParams, type OnlineEvaluatorSpendParams as OnlineEvaluatorSpendParams, };
|
|
238
|
-
export { Feedback as Feedback, type APIFeedbackSource as APIFeedbackSource, type AppFeedbackSource as AppFeedbackSource, type AutoEvalFeedbackSource as AutoEvalFeedbackSource, type FeedbackCreateSchema as FeedbackCreateSchema, type FeedbackLevel as FeedbackLevel, type FeedbackSchema as FeedbackSchema, type ModelFeedbackSource as ModelFeedbackSource, type SourceType as SourceType, type FeedbackDeleteResponse as FeedbackDeleteResponse, type FeedbackSchemasOffsetPaginationTopLevelArray as FeedbackSchemasOffsetPaginationTopLevelArray, type FeedbackCreateParams as FeedbackCreateParams, type FeedbackRetrieveParams as FeedbackRetrieveParams, type FeedbackUpdateParams as FeedbackUpdateParams, type FeedbackListParams as FeedbackListParams, };
|
|
239
|
-
export { Public as Public, type PublicRetrieveFeedbacksParams as PublicRetrieveFeedbacksParams };
|
|
240
|
-
export { AnnotationQueues as AnnotationQueues, type AnnotationQueueRubricItemSchema as AnnotationQueueRubricItemSchema, type AnnotationQueueSchema as AnnotationQueueSchema, type AnnotationQueueSizeSchema as AnnotationQueueSizeSchema, type RunSchemaWithAnnotationQueueInfo as RunSchemaWithAnnotationQueueInfo, type AnnotationQueueRetrieveResponse as AnnotationQueueRetrieveResponse, type AnnotationQueueUpdateResponse as AnnotationQueueUpdateResponse, type AnnotationQueueDeleteResponse as AnnotationQueueDeleteResponse, type AnnotationQueueCreateRunStatusResponse as AnnotationQueueCreateRunStatusResponse, type AnnotationQueueExportResponse as AnnotationQueueExportResponse, type AnnotationQueuePopulateResponse as AnnotationQueuePopulateResponse, type AnnotationQueueRetrieveAnnotationQueuesResponse as AnnotationQueueRetrieveAnnotationQueuesResponse, type AnnotationQueueRetrieveQueuesResponse as AnnotationQueueRetrieveQueuesResponse, type AnnotationQueueRetrieveAnnotationQueuesResponsesOffsetPaginationTopLevelArray as AnnotationQueueRetrieveAnnotationQueuesResponsesOffsetPaginationTopLevelArray, type AnnotationQueueUpdateParams as AnnotationQueueUpdateParams, type AnnotationQueueAnnotationQueuesParams as AnnotationQueueAnnotationQueuesParams, type AnnotationQueueCreateRunStatusParams as AnnotationQueueCreateRunStatusParams, type AnnotationQueueExportParams as AnnotationQueueExportParams, type AnnotationQueuePopulateParams as AnnotationQueuePopulateParams, type AnnotationQueueRetrieveAnnotationQueuesParams as AnnotationQueueRetrieveAnnotationQueuesParams, type AnnotationQueueRetrieveRunParams as AnnotationQueueRetrieveRunParams, type AnnotationQueueRetrieveSizeParams as AnnotationQueueRetrieveSizeParams, type AnnotationQueueRetrieveTotalArchivedParams as AnnotationQueueRetrieveTotalArchivedParams, };
|
|
241
213
|
export { Info as Info, type InfoListResponse as InfoListResponse };
|
|
242
|
-
export { Workspaces as Workspaces, type WorkspaceCreateResponse as WorkspaceCreateResponse, type WorkspaceUpdateResponse as WorkspaceUpdateResponse, type WorkspaceListResponse as WorkspaceListResponse, type WorkspaceDeleteResponse as WorkspaceDeleteResponse, type WorkspaceCreateParams as WorkspaceCreateParams, type WorkspaceUpdateParams as WorkspaceUpdateParams, type WorkspaceListParams as WorkspaceListParams, };
|
|
243
|
-
export { Repos as Repos, type CreateRepoResponse as CreateRepoResponse, type DemoConfig as DemoConfig, type EPromptOptimizationAlgorithm as EPromptOptimizationAlgorithm, type GetRepoResponse as GetRepoResponse, type PromptimConfig as PromptimConfig, type RepoWithLookups as RepoWithLookups, type RepoDeleteResponse as RepoDeleteResponse, type RepoWithLookupsOffsetPaginationRepos as RepoWithLookupsOffsetPaginationRepos, type RepoCreateParams as RepoCreateParams, type RepoRetrieveParams as RepoRetrieveParams, type RepoUpdateParams as RepoUpdateParams, type RepoListParams as RepoListParams, type RepoDeleteParams as RepoDeleteParams, };
|
|
244
|
-
export { Commits as Commits, type CommitManifestResponse as CommitManifestResponse, type CommitWithLookups as CommitWithLookups, type CommitCreateResponse as CommitCreateResponse, type CommitRetrieveResponse as CommitRetrieveResponse, type CommitWithLookupsOffsetPaginationCommits as CommitWithLookupsOffsetPaginationCommits, type CommitCreateParams as CommitCreateParams, type CommitRetrieveParams as CommitRetrieveParams, type CommitListParams as CommitListParams, };
|
|
245
|
-
export { Settings as Settings, type AppHubCrudTenantsTenant as AppHubCrudTenantsTenant };
|
|
246
|
-
export { Sandboxes as Sandboxes };
|
|
247
214
|
}
|
|
@@ -26,20 +26,9 @@ import * as Pagination from './core/pagination.js';
|
|
|
26
26
|
import * as Uploads from './core/uploads.js';
|
|
27
27
|
import * as API from './resources/index.js';
|
|
28
28
|
import { APIPromise } from './core/api-promise.js';
|
|
29
|
-
import { Commits, } from './resources/commits.js';
|
|
30
|
-
import { Evaluators, } from './resources/evaluators.js';
|
|
31
29
|
import { Info } from './resources/info.js';
|
|
32
30
|
import { OnlineEvaluators, } from './resources/online-evaluators.js';
|
|
33
|
-
import { Settings } from './resources/settings.js';
|
|
34
|
-
import { Workspaces, } from './resources/workspaces.js';
|
|
35
|
-
import { AnnotationQueues, } from './resources/annotation-queues/annotation-queues.js';
|
|
36
31
|
import { Datasets, } from './resources/datasets/datasets.js';
|
|
37
|
-
import { Examples, } from './resources/examples/examples.js';
|
|
38
|
-
import { Feedback, } from './resources/feedback/feedback.js';
|
|
39
|
-
import { Public } from './resources/public/public.js';
|
|
40
|
-
import { Repos, } from './resources/repos/repos.js';
|
|
41
|
-
import { Runs, } from './resources/runs/runs.js';
|
|
42
|
-
import { Sandboxes } from './resources/sandboxes/sandboxes.js';
|
|
43
32
|
import { Sessions, } from './resources/sessions/sessions.js';
|
|
44
33
|
import { buildHeaders } from './internal/headers.js';
|
|
45
34
|
import { readEnv } from './internal/utils/env.js';
|
|
@@ -137,90 +126,24 @@ export class Langsmith {
|
|
|
137
126
|
writable: true,
|
|
138
127
|
value: new API.Sessions(this)
|
|
139
128
|
});
|
|
140
|
-
Object.defineProperty(this, "examples", {
|
|
141
|
-
enumerable: true,
|
|
142
|
-
configurable: true,
|
|
143
|
-
writable: true,
|
|
144
|
-
value: new API.Examples(this)
|
|
145
|
-
});
|
|
146
129
|
Object.defineProperty(this, "datasets", {
|
|
147
130
|
enumerable: true,
|
|
148
131
|
configurable: true,
|
|
149
132
|
writable: true,
|
|
150
133
|
value: new API.Datasets(this)
|
|
151
134
|
});
|
|
152
|
-
Object.defineProperty(this, "runs", {
|
|
153
|
-
enumerable: true,
|
|
154
|
-
configurable: true,
|
|
155
|
-
writable: true,
|
|
156
|
-
value: new API.Runs(this)
|
|
157
|
-
});
|
|
158
|
-
Object.defineProperty(this, "evaluators", {
|
|
159
|
-
enumerable: true,
|
|
160
|
-
configurable: true,
|
|
161
|
-
writable: true,
|
|
162
|
-
value: new API.Evaluators(this)
|
|
163
|
-
});
|
|
164
135
|
Object.defineProperty(this, "onlineEvaluators", {
|
|
165
136
|
enumerable: true,
|
|
166
137
|
configurable: true,
|
|
167
138
|
writable: true,
|
|
168
139
|
value: new API.OnlineEvaluators(this)
|
|
169
140
|
});
|
|
170
|
-
Object.defineProperty(this, "feedback", {
|
|
171
|
-
enumerable: true,
|
|
172
|
-
configurable: true,
|
|
173
|
-
writable: true,
|
|
174
|
-
value: new API.Feedback(this)
|
|
175
|
-
});
|
|
176
|
-
Object.defineProperty(this, "public", {
|
|
177
|
-
enumerable: true,
|
|
178
|
-
configurable: true,
|
|
179
|
-
writable: true,
|
|
180
|
-
value: new API.Public(this)
|
|
181
|
-
});
|
|
182
|
-
Object.defineProperty(this, "annotationQueues", {
|
|
183
|
-
enumerable: true,
|
|
184
|
-
configurable: true,
|
|
185
|
-
writable: true,
|
|
186
|
-
value: new API.AnnotationQueues(this)
|
|
187
|
-
});
|
|
188
141
|
Object.defineProperty(this, "info", {
|
|
189
142
|
enumerable: true,
|
|
190
143
|
configurable: true,
|
|
191
144
|
writable: true,
|
|
192
145
|
value: new API.Info(this)
|
|
193
146
|
});
|
|
194
|
-
Object.defineProperty(this, "workspaces", {
|
|
195
|
-
enumerable: true,
|
|
196
|
-
configurable: true,
|
|
197
|
-
writable: true,
|
|
198
|
-
value: new API.Workspaces(this)
|
|
199
|
-
});
|
|
200
|
-
Object.defineProperty(this, "repos", {
|
|
201
|
-
enumerable: true,
|
|
202
|
-
configurable: true,
|
|
203
|
-
writable: true,
|
|
204
|
-
value: new API.Repos(this)
|
|
205
|
-
});
|
|
206
|
-
Object.defineProperty(this, "commits", {
|
|
207
|
-
enumerable: true,
|
|
208
|
-
configurable: true,
|
|
209
|
-
writable: true,
|
|
210
|
-
value: new API.Commits(this)
|
|
211
|
-
});
|
|
212
|
-
Object.defineProperty(this, "settings", {
|
|
213
|
-
enumerable: true,
|
|
214
|
-
configurable: true,
|
|
215
|
-
writable: true,
|
|
216
|
-
value: new API.Settings(this)
|
|
217
|
-
});
|
|
218
|
-
Object.defineProperty(this, "sandboxes", {
|
|
219
|
-
enumerable: true,
|
|
220
|
-
configurable: true,
|
|
221
|
-
writable: true,
|
|
222
|
-
value: new API.Sandboxes(this)
|
|
223
|
-
});
|
|
224
147
|
const options = {
|
|
225
148
|
apiKey,
|
|
226
149
|
tenantID,
|
|
@@ -761,17 +684,6 @@ Object.defineProperty(Langsmith, "toFile", {
|
|
|
761
684
|
value: Uploads.toFile
|
|
762
685
|
});
|
|
763
686
|
Langsmith.Sessions = Sessions;
|
|
764
|
-
Langsmith.Examples = Examples;
|
|
765
687
|
Langsmith.Datasets = Datasets;
|
|
766
|
-
Langsmith.Runs = Runs;
|
|
767
|
-
Langsmith.Evaluators = Evaluators;
|
|
768
688
|
Langsmith.OnlineEvaluators = OnlineEvaluators;
|
|
769
|
-
Langsmith.Feedback = Feedback;
|
|
770
|
-
Langsmith.Public = Public;
|
|
771
|
-
Langsmith.AnnotationQueues = AnnotationQueues;
|
|
772
689
|
Langsmith.Info = Info;
|
|
773
|
-
Langsmith.Workspaces = Workspaces;
|
|
774
|
-
Langsmith.Repos = Repos;
|
|
775
|
-
Langsmith.Commits = Commits;
|
|
776
|
-
Langsmith.Settings = Settings;
|
|
777
|
-
Langsmith.Sandboxes = Sandboxes;
|
|
@@ -1,4 +1,17 @@
|
|
|
1
1
|
type HeaderValue = string | undefined | null;
|
|
2
|
+
declare const brand_privateNullableHeaders: unique symbol;
|
|
3
|
+
/**
|
|
4
|
+
* Users can pass explicit nulls to unset default headers. When we parse them
|
|
5
|
+
* into a standard headers type we need to preserve that information.
|
|
6
|
+
*/
|
|
7
|
+
export type NullableHeaders = {
|
|
8
|
+
/** Brand check, prevent users from creating a NullableHeaders. */
|
|
9
|
+
[brand_privateNullableHeaders]: true;
|
|
10
|
+
/** Parsed headers. */
|
|
11
|
+
values: Headers;
|
|
12
|
+
/** Set of lowercase header names explicitly set to null. */
|
|
13
|
+
nulls: Set<string>;
|
|
14
|
+
};
|
|
2
15
|
export type HeadersLike = Headers | readonly HeaderValue[][] | Record<string, HeaderValue | readonly HeaderValue[]> | undefined | null | NullableHeaders;
|
|
3
16
|
export declare const buildHeaders: (newHeaders: HeadersLike[]) => NullableHeaders;
|
|
4
17
|
export declare const isEmptyHeaders: (headers: HeadersLike) => boolean;
|
|
@@ -23,35 +23,8 @@ type OverloadedParameters<T> = T extends ({
|
|
|
23
23
|
(...args: infer A): unknown;
|
|
24
24
|
(...args: infer B): unknown;
|
|
25
25
|
}) ? A | B : T extends (...args: infer A) => unknown ? A : never;
|
|
26
|
-
/**
|
|
27
|
-
* These imports attempt to get types from a parent package's dependencies.
|
|
28
|
-
* Unresolved bare specifiers can trigger [automatic type acquisition][1] in some projects, which
|
|
29
|
-
* would cause typescript to show types not present at runtime. To avoid this, we import
|
|
30
|
-
* directly from parent node_modules folders.
|
|
31
|
-
*
|
|
32
|
-
* We need to check multiple levels because we don't know what directory structure we'll be in.
|
|
33
|
-
* For example, pnpm generates directories like this:
|
|
34
|
-
* ```
|
|
35
|
-
* node_modules
|
|
36
|
-
* ├── .pnpm
|
|
37
|
-
* │ └── pkg@1.0.0
|
|
38
|
-
* │ └── node_modules
|
|
39
|
-
* │ └── pkg
|
|
40
|
-
* │ └── internal
|
|
41
|
-
* │ └── types.d.ts
|
|
42
|
-
* ├── pkg -> .pnpm/pkg@1.0.0/node_modules/pkg
|
|
43
|
-
* └── undici
|
|
44
|
-
* ```
|
|
45
|
-
*
|
|
46
|
-
* [1]: https://www.typescriptlang.org/tsconfig/#typeAcquisition
|
|
47
|
-
*/
|
|
48
|
-
/** @ts-ignore For users with \@types/node */ type UndiciTypesRequestInit = NotAny<import('../node_modules/undici-types/index.d.ts').RequestInit> | NotAny<import('../../node_modules/undici-types/index.d.ts').RequestInit> | NotAny<import('../../../node_modules/undici-types/index.d.ts').RequestInit> | NotAny<import('../../../../node_modules/undici-types/index.d.ts').RequestInit> | NotAny<import('../../../../../node_modules/undici-types/index.d.ts').RequestInit> | NotAny<import('../../../../../../node_modules/undici-types/index.d.ts').RequestInit> | NotAny<import('../../../../../../../node_modules/undici-types/index.d.ts').RequestInit> | NotAny<import('../../../../../../../../node_modules/undici-types/index.d.ts').RequestInit> | NotAny<import('../../../../../../../../../node_modules/undici-types/index.d.ts').RequestInit> | NotAny<import('../../../../../../../../../../node_modules/undici-types/index.d.ts').RequestInit>;
|
|
49
|
-
/** @ts-ignore For users with undici */ type UndiciRequestInit = NotAny<import('../node_modules/undici/index.d.ts').RequestInit> | NotAny<import('../../node_modules/undici/index.d.ts').RequestInit> | NotAny<import('../../../node_modules/undici/index.d.ts').RequestInit> | NotAny<import('../../../../node_modules/undici/index.d.ts').RequestInit> | NotAny<import('../../../../../node_modules/undici/index.d.ts').RequestInit> | NotAny<import('../../../../../../node_modules/undici/index.d.ts').RequestInit> | NotAny<import('../../../../../../../node_modules/undici/index.d.ts').RequestInit> | NotAny<import('../../../../../../../../node_modules/undici/index.d.ts').RequestInit> | NotAny<import('../../../../../../../../../node_modules/undici/index.d.ts').RequestInit> | NotAny<import('../../../../../../../../../../node_modules/undici/index.d.ts').RequestInit>;
|
|
50
|
-
/** @ts-ignore For users with \@types/bun */ type BunRequestInit = globalThis.FetchRequestInit;
|
|
51
|
-
/** @ts-ignore For users with node-fetch@2 */ type NodeFetch2RequestInit = NotAny<import('../node_modules/@types/node-fetch/index.d.ts').RequestInit> | NotAny<import('../../node_modules/@types/node-fetch/index.d.ts').RequestInit> | NotAny<import('../../../node_modules/@types/node-fetch/index.d.ts').RequestInit> | NotAny<import('../../../../node_modules/@types/node-fetch/index.d.ts').RequestInit> | NotAny<import('../../../../../node_modules/@types/node-fetch/index.d.ts').RequestInit> | NotAny<import('../../../../../../node_modules/@types/node-fetch/index.d.ts').RequestInit> | NotAny<import('../../../../../../../node_modules/@types/node-fetch/index.d.ts').RequestInit> | NotAny<import('../../../../../../../../node_modules/@types/node-fetch/index.d.ts').RequestInit> | NotAny<import('../../../../../../../../../node_modules/@types/node-fetch/index.d.ts').RequestInit> | NotAny<import('../../../../../../../../../../node_modules/@types/node-fetch/index.d.ts').RequestInit>;
|
|
52
|
-
/** @ts-ignore For users with node-fetch@3, doesn't need file extension because types are at ./@types/index.d.ts */ type NodeFetch3RequestInit = NotAny<import('../node_modules/node-fetch').RequestInit> | NotAny<import('../../node_modules/node-fetch').RequestInit> | NotAny<import('../../../node_modules/node-fetch').RequestInit> | NotAny<import('../../../../node_modules/node-fetch').RequestInit> | NotAny<import('../../../../../node_modules/node-fetch').RequestInit> | NotAny<import('../../../../../../node_modules/node-fetch').RequestInit> | NotAny<import('../../../../../../../node_modules/node-fetch').RequestInit> | NotAny<import('../../../../../../../../node_modules/node-fetch').RequestInit> | NotAny<import('../../../../../../../../../node_modules/node-fetch').RequestInit> | NotAny<import('../../../../../../../../../../node_modules/node-fetch').RequestInit>;
|
|
53
26
|
/** @ts-ignore For users who use Deno */ type FetchRequestInit = NonNullable<OverloadedParameters<typeof fetch>[1]>;
|
|
54
|
-
type RequestInits = NotAny<
|
|
27
|
+
type RequestInits = NotAny<RequestInit> | NotAny<FetchRequestInit>;
|
|
55
28
|
/**
|
|
56
29
|
* This type contains `RequestInit` options that may be available on the current runtime,
|
|
57
30
|
* including per-platform extensions like `dispatcher`, `agent`, `client`, etc.
|
|
@@ -13,8 +13,6 @@ import * as SplitsAPI from './splits.js';
|
|
|
13
13
|
import { SplitCreateParams, SplitCreateResponse, SplitRetrieveParams, SplitRetrieveResponse, Splits } from './splits.js';
|
|
14
14
|
import * as VersionsAPI from './versions.js';
|
|
15
15
|
import { VersionListParams, VersionRetrieveDiffParams, VersionRetrieveDiffResponse, Versions } from './versions.js';
|
|
16
|
-
import * as ExamplesAPI from '../examples/examples.js';
|
|
17
|
-
import * as FeedbackAPI from '../feedback/feedback.js';
|
|
18
16
|
import { APIPromise } from '../../core/api-promise.js';
|
|
19
17
|
import { OffsetPaginationTopLevelArray, type OffsetPaginationTopLevelArrayParams, PagePromise } from '../../core/pagination.js';
|
|
20
18
|
import { type Uploadable } from '../../core/uploads.js';
|
|
@@ -152,7 +150,7 @@ export interface FeedbackCreateCoreSchema {
|
|
|
152
150
|
/**
|
|
153
151
|
* Feedback from the LangChainPlus App.
|
|
154
152
|
*/
|
|
155
|
-
feedback_source?:
|
|
153
|
+
feedback_source?: FeedbackCreateCoreSchema.AppFeedbackSource | FeedbackCreateCoreSchema.APIFeedbackSource | FeedbackCreateCoreSchema.ModelFeedbackSource | FeedbackCreateCoreSchema.AutoEvalFeedbackSource | null;
|
|
156
154
|
modified_at?: string;
|
|
157
155
|
score?: number | boolean | null;
|
|
158
156
|
value?: number | boolean | string | {
|
|
@@ -178,6 +176,42 @@ export declare namespace FeedbackCreateCoreSchema {
|
|
|
178
176
|
label?: string | null;
|
|
179
177
|
}
|
|
180
178
|
}
|
|
179
|
+
/**
|
|
180
|
+
* Feedback from the LangChainPlus App.
|
|
181
|
+
*/
|
|
182
|
+
interface AppFeedbackSource {
|
|
183
|
+
metadata?: {
|
|
184
|
+
[key: string]: unknown;
|
|
185
|
+
} | null;
|
|
186
|
+
type?: 'app';
|
|
187
|
+
}
|
|
188
|
+
/**
|
|
189
|
+
* API feedback source.
|
|
190
|
+
*/
|
|
191
|
+
interface APIFeedbackSource {
|
|
192
|
+
metadata?: {
|
|
193
|
+
[key: string]: unknown;
|
|
194
|
+
} | null;
|
|
195
|
+
type?: 'api';
|
|
196
|
+
}
|
|
197
|
+
/**
|
|
198
|
+
* Model feedback source.
|
|
199
|
+
*/
|
|
200
|
+
interface ModelFeedbackSource {
|
|
201
|
+
metadata?: {
|
|
202
|
+
[key: string]: unknown;
|
|
203
|
+
} | null;
|
|
204
|
+
type?: 'model';
|
|
205
|
+
}
|
|
206
|
+
/**
|
|
207
|
+
* Auto eval feedback source.
|
|
208
|
+
*/
|
|
209
|
+
interface AutoEvalFeedbackSource {
|
|
210
|
+
metadata?: {
|
|
211
|
+
[key: string]: unknown;
|
|
212
|
+
} | null;
|
|
213
|
+
type?: 'auto_eval';
|
|
214
|
+
}
|
|
181
215
|
}
|
|
182
216
|
export interface Missing {
|
|
183
217
|
__missing__: '__missing__';
|
|
@@ -258,7 +292,7 @@ export declare namespace DatasetUpdateParams {
|
|
|
258
292
|
* Update class for Example.
|
|
259
293
|
*/
|
|
260
294
|
interface PatchExamples {
|
|
261
|
-
attachments_operations?:
|
|
295
|
+
attachments_operations?: PatchExamples.AttachmentsOperations | null;
|
|
262
296
|
dataset_id?: string | null;
|
|
263
297
|
inputs?: {
|
|
264
298
|
[key: string]: unknown;
|
|
@@ -272,6 +306,20 @@ export declare namespace DatasetUpdateParams {
|
|
|
272
306
|
overwrite?: boolean;
|
|
273
307
|
split?: Array<string> | string | null;
|
|
274
308
|
}
|
|
309
|
+
namespace PatchExamples {
|
|
310
|
+
interface AttachmentsOperations {
|
|
311
|
+
/**
|
|
312
|
+
* Mapping of old attachment names to new names
|
|
313
|
+
*/
|
|
314
|
+
rename?: {
|
|
315
|
+
[key: string]: string;
|
|
316
|
+
};
|
|
317
|
+
/**
|
|
318
|
+
* List of attachment names to keep
|
|
319
|
+
*/
|
|
320
|
+
retain?: Array<string>;
|
|
321
|
+
}
|
|
322
|
+
}
|
|
275
323
|
}
|
|
276
324
|
export interface DatasetListParams extends OffsetPaginationTopLevelArrayParams {
|
|
277
325
|
id?: Array<string> | null;
|
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
import { APIResource } from '../../core/resource.js';
|
|
2
|
-
import * as RunsAPI_ from '../runs/runs.js';
|
|
3
2
|
import { APIPromise } from '../../core/api-promise.js';
|
|
4
3
|
import { RequestOptions } from '../../internal/request-options.js';
|
|
5
4
|
export declare class Runs extends APIResource {
|
|
@@ -53,7 +52,7 @@ export declare namespace ExampleWithRunsCh {
|
|
|
53
52
|
/**
|
|
54
53
|
* Enum for run types.
|
|
55
54
|
*/
|
|
56
|
-
run_type:
|
|
55
|
+
run_type: 'tool' | 'chain' | 'llm' | 'retriever' | 'embedding' | 'prompt' | 'parser';
|
|
57
56
|
session_id: string;
|
|
58
57
|
status: string;
|
|
59
58
|
trace_id: string;
|
|
@@ -2,34 +2,12 @@
|
|
|
2
2
|
// @ts-nocheck
|
|
3
3
|
// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
|
|
4
4
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
5
|
-
exports.
|
|
6
|
-
var annotation_queues_js_1 = require("./annotation-queues/annotation-queues.cjs");
|
|
7
|
-
Object.defineProperty(exports, "AnnotationQueues", { enumerable: true, get: function () { return annotation_queues_js_1.AnnotationQueues; } });
|
|
8
|
-
var commits_js_1 = require("./commits.cjs");
|
|
9
|
-
Object.defineProperty(exports, "Commits", { enumerable: true, get: function () { return commits_js_1.Commits; } });
|
|
5
|
+
exports.Sessions = exports.OnlineEvaluators = exports.Info = exports.Datasets = void 0;
|
|
10
6
|
var datasets_js_1 = require("./datasets/datasets.cjs");
|
|
11
7
|
Object.defineProperty(exports, "Datasets", { enumerable: true, get: function () { return datasets_js_1.Datasets; } });
|
|
12
|
-
var evaluators_js_1 = require("./evaluators.cjs");
|
|
13
|
-
Object.defineProperty(exports, "Evaluators", { enumerable: true, get: function () { return evaluators_js_1.Evaluators; } });
|
|
14
|
-
var examples_js_1 = require("./examples/examples.cjs");
|
|
15
|
-
Object.defineProperty(exports, "Examples", { enumerable: true, get: function () { return examples_js_1.Examples; } });
|
|
16
|
-
var feedback_js_1 = require("./feedback/feedback.cjs");
|
|
17
|
-
Object.defineProperty(exports, "Feedback", { enumerable: true, get: function () { return feedback_js_1.Feedback; } });
|
|
18
8
|
var info_js_1 = require("./info.cjs");
|
|
19
9
|
Object.defineProperty(exports, "Info", { enumerable: true, get: function () { return info_js_1.Info; } });
|
|
20
10
|
var online_evaluators_js_1 = require("./online-evaluators.cjs");
|
|
21
11
|
Object.defineProperty(exports, "OnlineEvaluators", { enumerable: true, get: function () { return online_evaluators_js_1.OnlineEvaluators; } });
|
|
22
|
-
var public_js_1 = require("./public/public.cjs");
|
|
23
|
-
Object.defineProperty(exports, "Public", { enumerable: true, get: function () { return public_js_1.Public; } });
|
|
24
|
-
var repos_js_1 = require("./repos/repos.cjs");
|
|
25
|
-
Object.defineProperty(exports, "Repos", { enumerable: true, get: function () { return repos_js_1.Repos; } });
|
|
26
|
-
var runs_js_1 = require("./runs/runs.cjs");
|
|
27
|
-
Object.defineProperty(exports, "Runs", { enumerable: true, get: function () { return runs_js_1.Runs; } });
|
|
28
|
-
var sandboxes_js_1 = require("./sandboxes/sandboxes.cjs");
|
|
29
|
-
Object.defineProperty(exports, "Sandboxes", { enumerable: true, get: function () { return sandboxes_js_1.Sandboxes; } });
|
|
30
12
|
var sessions_js_1 = require("./sessions/sessions.cjs");
|
|
31
13
|
Object.defineProperty(exports, "Sessions", { enumerable: true, get: function () { return sessions_js_1.Sessions; } });
|
|
32
|
-
var settings_js_1 = require("./settings.cjs");
|
|
33
|
-
Object.defineProperty(exports, "Settings", { enumerable: true, get: function () { return settings_js_1.Settings; } });
|
|
34
|
-
var workspaces_js_1 = require("./workspaces.cjs");
|
|
35
|
-
Object.defineProperty(exports, "Workspaces", { enumerable: true, get: function () { return workspaces_js_1.Workspaces; } });
|