Upgrading of analytic dependencies - langfuse and langsmith.

This commit is contained in:
vinodkiran
2023-12-30 18:22:21 +05:30
parent 0f03fe54e3
commit 9e7f3587f1
2 changed files with 7 additions and 6 deletions
+4 -3
View File
@@ -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
})
}
}