langsmith 0.1.50 → 0.1.51
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 +11 -1
- package/dist/client.d.ts +10 -1
- package/dist/client.js +11 -1
- package/dist/index.cjs +1 -1
- package/dist/index.d.ts +1 -1
- package/dist/index.js +1 -1
- package/package.json +1 -1
package/dist/client.cjs
CHANGED
|
@@ -1597,6 +1597,13 @@ class Client {
|
|
|
1597
1597
|
* similar examples in order of most similar to least similar. If no similar
|
|
1598
1598
|
* examples are found, random examples will be returned.
|
|
1599
1599
|
*
|
|
1600
|
+
* @param filter A filter string to apply to the search. Only examples will be returned that
|
|
1601
|
+
* match the filter string. Some examples of filters
|
|
1602
|
+
*
|
|
1603
|
+
* - eq(metadata.mykey, "value")
|
|
1604
|
+
* - and(neq(metadata.my.nested.key, "value"), neq(metadata.mykey, "value"))
|
|
1605
|
+
* - or(eq(metadata.mykey, "value"), eq(metadata.mykey, "othervalue"))
|
|
1606
|
+
*
|
|
1600
1607
|
* @returns A list of similar examples.
|
|
1601
1608
|
*
|
|
1602
1609
|
*
|
|
@@ -1606,11 +1613,14 @@ class Client {
|
|
|
1606
1613
|
* limit = 5
|
|
1607
1614
|
* examples = await client.similarExamples(inputs, dataset_id, limit)
|
|
1608
1615
|
*/
|
|
1609
|
-
async similarExamples(inputs, datasetId, limit) {
|
|
1616
|
+
async similarExamples(inputs, datasetId, limit, { filter, } = {}) {
|
|
1610
1617
|
const data = {
|
|
1611
1618
|
limit: limit,
|
|
1612
1619
|
inputs: inputs,
|
|
1613
1620
|
};
|
|
1621
|
+
if (filter !== undefined) {
|
|
1622
|
+
data["filter"] = filter;
|
|
1623
|
+
}
|
|
1614
1624
|
(0, _uuid_js_1.assertUuid)(datasetId);
|
|
1615
1625
|
const response = await this.caller.call(fetch, `${this.apiUrl}/datasets/${datasetId}/search`, {
|
|
1616
1626
|
method: "POST",
|
package/dist/client.d.ts
CHANGED
|
@@ -457,6 +457,13 @@ export declare class Client {
|
|
|
457
457
|
* similar examples in order of most similar to least similar. If no similar
|
|
458
458
|
* examples are found, random examples will be returned.
|
|
459
459
|
*
|
|
460
|
+
* @param filter A filter string to apply to the search. Only examples will be returned that
|
|
461
|
+
* match the filter string. Some examples of filters
|
|
462
|
+
*
|
|
463
|
+
* - eq(metadata.mykey, "value")
|
|
464
|
+
* - and(neq(metadata.my.nested.key, "value"), neq(metadata.mykey, "value"))
|
|
465
|
+
* - or(eq(metadata.mykey, "value"), eq(metadata.mykey, "othervalue"))
|
|
466
|
+
*
|
|
460
467
|
* @returns A list of similar examples.
|
|
461
468
|
*
|
|
462
469
|
*
|
|
@@ -466,7 +473,9 @@ export declare class Client {
|
|
|
466
473
|
* limit = 5
|
|
467
474
|
* examples = await client.similarExamples(inputs, dataset_id, limit)
|
|
468
475
|
*/
|
|
469
|
-
similarExamples(inputs: KVMap, datasetId: string, limit: number
|
|
476
|
+
similarExamples(inputs: KVMap, datasetId: string, limit: number, { filter, }?: {
|
|
477
|
+
filter?: string;
|
|
478
|
+
}): Promise<ExampleSearch[]>;
|
|
470
479
|
createExample(inputs: KVMap, outputs: KVMap, { datasetId, datasetName, createdAt, exampleId, metadata, split, }: CreateExampleOptions): Promise<Example>;
|
|
471
480
|
createExamples(props: {
|
|
472
481
|
inputs: Array<KVMap>;
|
package/dist/client.js
CHANGED
|
@@ -1570,6 +1570,13 @@ export class Client {
|
|
|
1570
1570
|
* similar examples in order of most similar to least similar. If no similar
|
|
1571
1571
|
* examples are found, random examples will be returned.
|
|
1572
1572
|
*
|
|
1573
|
+
* @param filter A filter string to apply to the search. Only examples will be returned that
|
|
1574
|
+
* match the filter string. Some examples of filters
|
|
1575
|
+
*
|
|
1576
|
+
* - eq(metadata.mykey, "value")
|
|
1577
|
+
* - and(neq(metadata.my.nested.key, "value"), neq(metadata.mykey, "value"))
|
|
1578
|
+
* - or(eq(metadata.mykey, "value"), eq(metadata.mykey, "othervalue"))
|
|
1579
|
+
*
|
|
1573
1580
|
* @returns A list of similar examples.
|
|
1574
1581
|
*
|
|
1575
1582
|
*
|
|
@@ -1579,11 +1586,14 @@ export class Client {
|
|
|
1579
1586
|
* limit = 5
|
|
1580
1587
|
* examples = await client.similarExamples(inputs, dataset_id, limit)
|
|
1581
1588
|
*/
|
|
1582
|
-
async similarExamples(inputs, datasetId, limit) {
|
|
1589
|
+
async similarExamples(inputs, datasetId, limit, { filter, } = {}) {
|
|
1583
1590
|
const data = {
|
|
1584
1591
|
limit: limit,
|
|
1585
1592
|
inputs: inputs,
|
|
1586
1593
|
};
|
|
1594
|
+
if (filter !== undefined) {
|
|
1595
|
+
data["filter"] = filter;
|
|
1596
|
+
}
|
|
1587
1597
|
assertUuid(datasetId);
|
|
1588
1598
|
const response = await this.caller.call(fetch, `${this.apiUrl}/datasets/${datasetId}/search`, {
|
|
1589
1599
|
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.51";
|
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.51";
|
package/dist/index.js
CHANGED