Skip to content

Commit

Permalink
Improve interoperability between different langsmith versions
Browse files Browse the repository at this point in the history
  • Loading branch information
jacoblee93 committed Nov 30, 2024
1 parent 983acd2 commit 5897592
Show file tree
Hide file tree
Showing 3 changed files with 25 additions and 6 deletions.
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.2.0",
"langsmith": "^0.2.8",
"mustache": "^4.2.0",
"p-queue": "^6.6.2",
"p-retry": "4",
Expand Down
8 changes: 4 additions & 4 deletions langchain-core/src/tracers/tracer_langchain.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { Client } from "langsmith";
import type { Client, LangSmithTracingClientInterface } from "langsmith";
import { RunTree } from "langsmith/run_trees";
import { getCurrentRunTree } from "langsmith/singletons/traceable";

Expand Down Expand Up @@ -36,7 +36,7 @@ export interface RunUpdate extends BaseRunUpdate {
export interface LangChainTracerFields extends BaseCallbackHandlerInput {
exampleId?: string;
projectName?: string;
client?: Client;
client?: LangSmithTracingClientInterface;
}

export class LangChainTracer
Expand All @@ -49,7 +49,7 @@ export class LangChainTracer

exampleId?: string;

client: Client;
client: LangSmithTracingClientInterface;

constructor(fields: LangChainTracerFields = {}) {
super(fields);
Expand Down Expand Up @@ -156,7 +156,7 @@ export class LangChainTracer
parent_run: undefined,

// inherited properties
client: this.client,
client: this.client as Client,
project_name: this.projectName,
reference_example_id: this.exampleId,
tracingEnabled: true,
Expand Down
21 changes: 20 additions & 1 deletion yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -12263,7 +12263,7 @@ __metadata:
jest: ^29.5.0
jest-environment-node: ^29.6.4
js-tiktoken: ^1.0.12
langsmith: ^0.2.0
langsmith: ^0.2.8
ml-matrix: ^6.10.4
mustache: ^4.2.0
p-queue: ^6.6.2
Expand Down Expand Up @@ -33427,6 +33427,25 @@ __metadata:
languageName: node
linkType: hard

"langsmith@npm:^0.2.8":
version: 0.2.8
resolution: "langsmith@npm:0.2.8"
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: 8695df08a09b9885b0308c66fbf9802edbe20e286fec3db8faa75ed1893a7aafae014441e311677bb60abb33af49da7f7d8404f55fffbdad5aec61cf65215fc8
languageName: node
linkType: hard

"language-subtag-registry@npm:^0.3.20, language-subtag-registry@npm:~0.3.2":
version: 0.3.22
resolution: "language-subtag-registry@npm:0.3.22"
Expand Down

0 comments on commit 5897592

Please sign in to comment.