langsmith 0.0.23 → 0.0.25

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.
@@ -6,8 +6,6 @@ services:
6
6
  image: langchain/${_LANGSMITH_IMAGE_PREFIX-}langchainplus-frontend:latest
7
7
  ports:
8
8
  - 80:80
9
- environment:
10
- - REACT_APP_BACKEND_URL=http://localhost:1984
11
9
  depends_on:
12
10
  - langchain-backend
13
11
  - langchain-playground
@@ -22,6 +20,13 @@ services:
22
20
  - 1984:1984
23
21
  depends_on:
24
22
  - langchain-db
23
+ - langchain-redis
24
+ langchain-queue:
25
+ image: langchain/${_LANGSMITH_IMAGE_PREFIX-}langchainplus-backend:latest
26
+ environment:
27
+ - LANGCHAIN_ENV=local_docker
28
+ - LOG_LEVEL=warning
29
+ entrypoint: "rq worker --with-scheduler -u redis://langchain-redis:6379 --serializer lc_database.queue.serializer.ORJSONSerializer --worker-class lc_database.queue.worker.Worker"
25
30
  langchain-db:
26
31
  image: postgres:14.7
27
32
  command:
@@ -40,5 +45,12 @@ services:
40
45
  - langchain-db-data:/var/lib/postgresql/data
41
46
  ports:
42
47
  - 5433:5432
48
+ langchain-redis:
49
+ image: redis:7
50
+ ports:
51
+ - 63791:6379
52
+ volumes:
53
+ - langchain-redis-data:/data
43
54
  volumes:
44
55
  langchain-db-data:
56
+ langchain-redis-data:
package/dist/client.cjs CHANGED
@@ -588,7 +588,7 @@ class Client {
588
588
  const path = `/examples/${exampleId}`;
589
589
  return await this._get(path);
590
590
  }
591
- async *listExamples({ datasetId, datasetName, } = {}) {
591
+ async *listExamples({ datasetId, datasetName, exampleIds, } = {}) {
592
592
  let datasetId_;
593
593
  if (datasetId !== undefined && datasetName !== undefined) {
594
594
  throw new Error("Must provide either datasetName or datasetId, not both");
@@ -604,6 +604,11 @@ class Client {
604
604
  throw new Error("Must provide a datasetName or datasetId");
605
605
  }
606
606
  const params = new URLSearchParams({ dataset: datasetId_ });
607
+ if (exampleIds !== undefined) {
608
+ for (const id_ of exampleIds) {
609
+ params.append("id", id_);
610
+ }
611
+ }
607
612
  for await (const examples of this._getPaginated("/examples", params)) {
608
613
  yield* examples;
609
614
  }
package/dist/client.d.ts CHANGED
@@ -122,9 +122,10 @@ export declare class Client {
122
122
  createdAt?: Date;
123
123
  }): Promise<Example>;
124
124
  readExample(exampleId: string): Promise<Example>;
125
- listExamples({ datasetId, datasetName, }?: {
125
+ listExamples({ datasetId, datasetName, exampleIds, }?: {
126
126
  datasetId?: string;
127
127
  datasetName?: string;
128
+ exampleIds?: string[];
128
129
  }): AsyncIterable<Example>;
129
130
  deleteExample(exampleId: string): Promise<void>;
130
131
  updateExample(exampleId: string, update: ExampleUpdate): Promise<object>;
package/dist/client.js CHANGED
@@ -562,7 +562,7 @@ export class Client {
562
562
  const path = `/examples/${exampleId}`;
563
563
  return await this._get(path);
564
564
  }
565
- async *listExamples({ datasetId, datasetName, } = {}) {
565
+ async *listExamples({ datasetId, datasetName, exampleIds, } = {}) {
566
566
  let datasetId_;
567
567
  if (datasetId !== undefined && datasetName !== undefined) {
568
568
  throw new Error("Must provide either datasetName or datasetId, not both");
@@ -578,6 +578,11 @@ export class Client {
578
578
  throw new Error("Must provide a datasetName or datasetId");
579
579
  }
580
580
  const params = new URLSearchParams({ dataset: datasetId_ });
581
+ if (exampleIds !== undefined) {
582
+ for (const id_ of exampleIds) {
583
+ params.append("id", id_);
584
+ }
585
+ }
581
586
  for await (const examples of this._getPaginated("/examples", params)) {
582
587
  yield* examples;
583
588
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "langsmith",
3
- "version": "0.0.23",
3
+ "version": "0.0.25",
4
4
  "description": "Client library to connect to the LangSmith LLM Tracing and Evaluation Platform.",
5
5
  "files": [
6
6
  "dist/",