Feature/OpenAI Assistant V2 (#2258)

* add gpt4 turbo to assistant

* OpenAI Assistant V2

* update langfuse handler
This commit is contained in:
Henry Heng
2024-04-25 20:14:04 +01:00
committed by GitHub
parent 4782c0f6fc
commit 7360d1d9a6
25 changed files with 23422 additions and 17637 deletions
+21
View File
@@ -420,6 +420,11 @@ export class AnalyticHandler {
}
if (langfuseTraceClient) {
langfuseTraceClient.update({
input: {
text: input
}
})
const span = langfuseTraceClient.span({
name,
input: {
@@ -472,6 +477,14 @@ export class AnalyticHandler {
span.end({
output
})
const langfuseTraceClient = this.handlers['langFuse'].trace[returnIds['langFuse'].trace]
if (langfuseTraceClient) {
langfuseTraceClient.update({
output: {
output
}
})
}
if (shutdown) {
const langfuse: Langfuse = this.handlers['langFuse'].client
await langfuse.shutdownAsync()
@@ -513,6 +526,14 @@ export class AnalyticHandler {
error
}
})
const langfuseTraceClient = this.handlers['langFuse'].trace[returnIds['langFuse'].trace]
if (langfuseTraceClient) {
langfuseTraceClient.update({
output: {
error
}
})
}
if (shutdown) {
const langfuse: Langfuse = this.handlers['langFuse'].client
await langfuse.shutdownAsync()