From 9e7f3587f14881e5192ff4a2ef8f85d83b969fad Mon Sep 17 00:00:00 2001 From: vinodkiran Date: Sat, 30 Dec 2023 18:22:21 +0530 Subject: [PATCH 1/2] Upgrading of analytic dependencies - langfuse and langsmith. --- packages/components/package.json | 6 +++--- packages/components/src/handler.ts | 7 ++++--- 2 files changed, 7 insertions(+), 6 deletions(-) diff --git a/packages/components/package.json b/packages/components/package.json index 9cb0bf1e97c..ef1f92eb106 100644 --- a/packages/components/package.json +++ b/packages/components/package.json @@ -53,9 +53,9 @@ "husky": "^8.0.3", "ioredis": "^5.3.2", "langchain": "^0.0.196", - "langfuse": "^1.2.0", - "langfuse-langchain": "^1.0.31", - "langsmith": "^0.0.49", + "langfuse": "2.0.2", + "langfuse-langchain": "2.0.2", + "langsmith": "0.0.53", "linkifyjs": "^4.1.1", "llmonitor": "^0.5.5", "mammoth": "^1.5.1", diff --git a/packages/components/src/handler.ts b/packages/components/src/handler.ts index 29aff3e2f05..ce7a1a1caa7 100644 --- a/packages/components/src/handler.ts +++ b/packages/components/src/handler.ts @@ -536,9 +536,10 @@ export class AnalyticHandler { if (Object.prototype.hasOwnProperty.call(this.handlers, 'langFuse')) { const trace: LangfuseTraceClient | undefined = this.handlers['langFuse'].trace[parentIds['langFuse'].trace] if (trace) { + trace.id const generation = trace.generation({ name, - prompt: input + input: input }) this.handlers['langFuse'].generation = { [generation.id]: generation } returnIds['langFuse'].generation = generation.id @@ -583,7 +584,7 @@ export class AnalyticHandler { const generation: LangfuseGenerationClient | undefined = this.handlers['langFuse'].generation[returnIds['langFuse'].generation] if (generation) { generation.end({ - completion: output + output: output }) } } @@ -618,7 +619,7 @@ export class AnalyticHandler { const generation: LangfuseGenerationClient | undefined = this.handlers['langFuse'].generation[returnIds['langFuse'].generation] if (generation) { generation.end({ - completion: error + output: error }) } } From da76a151ff08d346c1091895876f109326b8fc89 Mon Sep 17 00:00:00 2001 From: vinodkiran Date: Sun, 31 Dec 2023 12:56:35 +0530 Subject: [PATCH 2/2] minor typo fixes... --- packages/components/src/handler.ts | 1 - 1 file changed, 1 deletion(-) diff --git a/packages/components/src/handler.ts b/packages/components/src/handler.ts index ce7a1a1caa7..1eb05a51746 100644 --- a/packages/components/src/handler.ts +++ b/packages/components/src/handler.ts @@ -536,7 +536,6 @@ export class AnalyticHandler { if (Object.prototype.hasOwnProperty.call(this.handlers, 'langFuse')) { const trace: LangfuseTraceClient | undefined = this.handlers['langFuse'].trace[parentIds['langFuse'].trace] if (trace) { - trace.id const generation = trace.generation({ name, input: input