langsmith 0.1.51 → 0.1.52
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/client.cjs +2 -1
- package/dist/client.d.ts +9 -1
- package/dist/client.js +2 -1
- package/dist/index.cjs +1 -1
- package/dist/index.d.ts +1 -1
- package/dist/index.js +1 -1
- package/dist/schemas.d.ts +1 -0
- package/package.json +1 -1
package/dist/client.cjs
CHANGED
|
@@ -1633,7 +1633,7 @@ class Client {
|
|
|
1633
1633
|
const result = await response.json();
|
|
1634
1634
|
return result["examples"];
|
|
1635
1635
|
}
|
|
1636
|
-
async createExample(inputs, outputs, { datasetId, datasetName, createdAt, exampleId, metadata, split, }) {
|
|
1636
|
+
async createExample(inputs, outputs, { datasetId, datasetName, createdAt, exampleId, metadata, split, sourceRunId, }) {
|
|
1637
1637
|
let datasetId_ = datasetId;
|
|
1638
1638
|
if (datasetId_ === undefined && datasetName === undefined) {
|
|
1639
1639
|
throw new Error("Must provide either datasetName or datasetId");
|
|
@@ -1654,6 +1654,7 @@ class Client {
|
|
|
1654
1654
|
id: exampleId,
|
|
1655
1655
|
metadata,
|
|
1656
1656
|
split,
|
|
1657
|
+
source_run_id: sourceRunId,
|
|
1657
1658
|
};
|
|
1658
1659
|
const response = await this.caller.call(fetch, `${this.apiUrl}/examples`, {
|
|
1659
1660
|
method: "POST",
|
package/dist/client.d.ts
CHANGED
|
@@ -141,12 +141,20 @@ interface ProjectOptions {
|
|
|
141
141
|
type RecordStringAny = Record<string, any>;
|
|
142
142
|
export type FeedbackSourceType = "model" | "api" | "app";
|
|
143
143
|
export type CreateExampleOptions = {
|
|
144
|
+
/** The ID of the dataset to create the example in. */
|
|
144
145
|
datasetId?: string;
|
|
146
|
+
/** The name of the dataset to create the example in (if dataset ID is not provided). */
|
|
145
147
|
datasetName?: string;
|
|
148
|
+
/** The creation date of the example. */
|
|
146
149
|
createdAt?: Date;
|
|
150
|
+
/** A unique identifier for the example. */
|
|
147
151
|
exampleId?: string;
|
|
152
|
+
/** Additional metadata associated with the example. */
|
|
148
153
|
metadata?: KVMap;
|
|
154
|
+
/** The split(s) to assign the example to. */
|
|
149
155
|
split?: string | string[];
|
|
156
|
+
/** The ID of the source run associated with this example. */
|
|
157
|
+
sourceRunId?: string;
|
|
150
158
|
};
|
|
151
159
|
export declare class Queue<T> {
|
|
152
160
|
items: [T, () => void][];
|
|
@@ -476,7 +484,7 @@ export declare class Client {
|
|
|
476
484
|
similarExamples(inputs: KVMap, datasetId: string, limit: number, { filter, }?: {
|
|
477
485
|
filter?: string;
|
|
478
486
|
}): Promise<ExampleSearch[]>;
|
|
479
|
-
createExample(inputs: KVMap, outputs: KVMap, { datasetId, datasetName, createdAt, exampleId, metadata, split, }: CreateExampleOptions): Promise<Example>;
|
|
487
|
+
createExample(inputs: KVMap, outputs: KVMap, { datasetId, datasetName, createdAt, exampleId, metadata, split, sourceRunId, }: CreateExampleOptions): Promise<Example>;
|
|
480
488
|
createExamples(props: {
|
|
481
489
|
inputs: Array<KVMap>;
|
|
482
490
|
outputs?: Array<KVMap>;
|
package/dist/client.js
CHANGED
|
@@ -1606,7 +1606,7 @@ export class Client {
|
|
|
1606
1606
|
const result = await response.json();
|
|
1607
1607
|
return result["examples"];
|
|
1608
1608
|
}
|
|
1609
|
-
async createExample(inputs, outputs, { datasetId, datasetName, createdAt, exampleId, metadata, split, }) {
|
|
1609
|
+
async createExample(inputs, outputs, { datasetId, datasetName, createdAt, exampleId, metadata, split, sourceRunId, }) {
|
|
1610
1610
|
let datasetId_ = datasetId;
|
|
1611
1611
|
if (datasetId_ === undefined && datasetName === undefined) {
|
|
1612
1612
|
throw new Error("Must provide either datasetName or datasetId");
|
|
@@ -1627,6 +1627,7 @@ export class Client {
|
|
|
1627
1627
|
id: exampleId,
|
|
1628
1628
|
metadata,
|
|
1629
1629
|
split,
|
|
1630
|
+
source_run_id: sourceRunId,
|
|
1630
1631
|
};
|
|
1631
1632
|
const response = await this.caller.call(fetch, `${this.apiUrl}/examples`, {
|
|
1632
1633
|
method: "POST",
|
package/dist/index.cjs
CHANGED
|
@@ -6,4 +6,4 @@ Object.defineProperty(exports, "Client", { enumerable: true, get: function () {
|
|
|
6
6
|
var run_trees_js_1 = require("./run_trees.cjs");
|
|
7
7
|
Object.defineProperty(exports, "RunTree", { enumerable: true, get: function () { return run_trees_js_1.RunTree; } });
|
|
8
8
|
// Update using yarn bump-version
|
|
9
|
-
exports.__version__ = "0.1.
|
|
9
|
+
exports.__version__ = "0.1.52";
|
package/dist/index.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
export { Client, type ClientConfig } from "./client.js";
|
|
2
2
|
export type { Dataset, Example, TracerSession, Run, Feedback, RetrieverOutput, } from "./schemas.js";
|
|
3
3
|
export { RunTree, type RunTreeConfig } from "./run_trees.js";
|
|
4
|
-
export declare const __version__ = "0.1.
|
|
4
|
+
export declare const __version__ = "0.1.52";
|
package/dist/index.js
CHANGED
package/dist/schemas.d.ts
CHANGED