Skip to content

Commit

Permalink
feat(core,langchain,community): Bump to LangSmith 0.2.0 (#7058)
Browse files Browse the repository at this point in the history
  • Loading branch information
jacoblee93 authored Oct 25, 2024
1 parent a0a8aef commit 6997cb7
Show file tree
Hide file tree
Showing 7 changed files with 27 additions and 37 deletions.
2 changes: 1 addition & 1 deletion examples/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,7 @@
"ioredis": "^5.3.2",
"js-yaml": "^4.1.0",
"langchain": "workspace:*",
"langsmith": "^0.1.56",
"langsmith": "^0.2.0",
"mongodb": "^6.3.0",
"pg": "^8.11.0",
"pickleparser": "^0.2.1",
Expand Down
2 changes: 1 addition & 1 deletion langchain-core/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@
"camelcase": "6",
"decamelize": "1.2.0",
"js-tiktoken": "^1.0.12",
"langsmith": "^0.1.65",
"langsmith": "^0.2.0",
"mustache": "^4.2.0",
"p-queue": "^6.6.2",
"p-retry": "4",
Expand Down
14 changes: 9 additions & 5 deletions langchain-core/src/tracers/tests/langsmith_interop.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -20,11 +20,15 @@ let fetchMock: any;
const originalTracingEnvValue = process.env.LANGCHAIN_TRACING_V2;

beforeEach(() => {
fetchMock = jest
.spyOn(global, "fetch")
.mockImplementation(() =>
Promise.resolve({ ok: true, text: () => "" } as any)
);
fetchMock = jest.spyOn(global, "fetch").mockImplementation(() =>
Promise.resolve({
ok: true,
text: () => "",
json: () => {
return {};
},
} as any)
);
process.env.LANGCHAIN_TRACING_V2 = "true";
});

Expand Down
7 changes: 6 additions & 1 deletion langchain-core/src/tracers/tracer_langchain.ts
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,12 @@ export class LangChainTracer
getEnvironmentVariable("LANGCHAIN_PROJECT") ??
getEnvironmentVariable("LANGCHAIN_SESSION");
this.exampleId = exampleId;
this.client = client ?? new Client({});
this.client =
client ??
new Client({
// LangChain has its own backgrounding system
blockOnRootRunFinalization: true,
});

const traceableTree = LangChainTracer.getTraceableRunTree();
if (traceableTree) {
Expand Down
2 changes: 1 addition & 1 deletion langchain/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -520,7 +520,7 @@
"js-tiktoken": "^1.0.12",
"js-yaml": "^4.1.0",
"jsonpointer": "^5.0.1",
"langsmith": "^0.1.56",
"langsmith": "^0.2.0",
"openapi-types": "^12.1.3",
"p-retry": "4",
"uuid": "^10.0.0",
Expand Down
2 changes: 1 addition & 1 deletion libs/langchain-community/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@
"flat": "^5.0.2",
"js-yaml": "^4.1.0",
"langchain": ">=0.2.3 <0.4.0",
"langsmith": "~0.1.56",
"langsmith": "^0.2.0",
"uuid": "^10.0.0",
"zod": "^3.22.3",
"zod-to-json-schema": "^3.22.5"
Expand Down
35 changes: 8 additions & 27 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -11583,7 +11583,7 @@ __metadata:
jsdom: ^22.1.0
jsonwebtoken: ^9.0.2
langchain: ">=0.2.3 <0.4.0"
langsmith: ~0.1.56
langsmith: ^0.2.0
llmonitor: ^0.5.9
lodash: ^4.17.21
lunary: ^0.7.10
Expand Down Expand Up @@ -12015,7 +12015,7 @@ __metadata:
jest: ^29.5.0
jest-environment-node: ^29.6.4
js-tiktoken: ^1.0.12
langsmith: ^0.1.65
langsmith: ^0.2.0
ml-matrix: ^6.10.4
mustache: ^4.2.0
p-queue: ^6.6.2
Expand Down Expand Up @@ -27338,7 +27338,7 @@ __metadata:
ioredis: ^5.3.2
js-yaml: ^4.1.0
langchain: "workspace:*"
langsmith: ^0.1.56
langsmith: ^0.2.0
mongodb: ^6.3.0
pg: ^8.11.0
pickleparser: ^0.2.1
Expand Down Expand Up @@ -32921,7 +32921,7 @@ __metadata:
js-tiktoken: ^1.0.12
js-yaml: ^4.1.0
jsonpointer: ^5.0.1
langsmith: ^0.1.56
langsmith: ^0.2.0
openai: ^4.41.1
openapi-types: ^12.1.3
p-retry: 4
Expand Down Expand Up @@ -33000,28 +33000,9 @@ __metadata:
languageName: unknown
linkType: soft

"langsmith@npm:^0.1.56, langsmith@npm:~0.1.56":
version: 0.1.56
resolution: "langsmith@npm:0.1.56"
dependencies:
"@types/uuid": ^10.0.0
commander: ^10.0.1
p-queue: ^6.6.2
p-retry: 4
semver: ^7.6.3
uuid: ^10.0.0
peerDependencies:
openai: "*"
peerDependenciesMeta:
openai:
optional: true
checksum: 61db6dc3016e35d14d25e78a8ecebcc6356f2efc00310f5582dce9d28a88377525425622d1b98f053e73c0b3233d44c5a2f9d5654ca72ee2e61163edd5be2d28
languageName: node
linkType: hard

"langsmith@npm:^0.1.65":
version: 0.1.65
resolution: "langsmith@npm:0.1.65"
"langsmith@npm:^0.2.0":
version: 0.2.0
resolution: "langsmith@npm:0.2.0"
dependencies:
"@types/uuid": ^10.0.0
commander: ^10.0.1
Expand All @@ -33034,7 +33015,7 @@ __metadata:
peerDependenciesMeta:
openai:
optional: true
checksum: ca44f26733fbb20675b84f2586b90622b8cf1aedc82123f5574af04e88ba29348e28b2b63f410479aeb7e5c174d2fef13b4bd9eb68581d93a104950b1fafa40f
checksum: 0cd92d0e31526d309af197a3502c93a00ac8c09f6b2864161a18a5c1e8b95b0e8203bad2dfe3b4beb26055fc815a8d70730592a58c9af7e202917b13d01f695c
languageName: node
linkType: hard

Expand Down

0 comments on commit 6997cb7

Please sign in to comment.