Comparing version 3.29.1 to 3.29.2-alpha.0
@@ -152,3 +152,3 @@ 'use strict'; | ||
var version = "3.29.1"; | ||
var version = "3.29.2-alpha.0"; | ||
@@ -544,2 +544,13 @@ class Langfuse extends langfuseCore.LangfuseCore { | ||
} | ||
// Add a shutdownAsync method to the OpenAI SDK that flushes the Langfuse client | ||
if (propKey === "shutdownAsync") { | ||
let langfuseClient; | ||
// Flush the correct client depending on whether a parent client is provided | ||
if (langfuseConfig && "parent" in langfuseConfig) { | ||
langfuseClient = langfuseConfig.parent.client; | ||
} else { | ||
langfuseClient = LangfuseSingleton.getInstance(); | ||
} | ||
return langfuseClient.shutdownAsync.bind(langfuseClient); | ||
} | ||
// Trace methods of the OpenAI SDK | ||
@@ -546,0 +557,0 @@ if (typeof originalProperty === "function") { |
@@ -70,3 +70,3 @@ import { LangfuseCoreOptions, LangfuseCore, LangfusePersistedProperty, LangfuseFetchOptions, LangfuseFetchResponse, LangfuseWebStateless, LangfuseTraceClient, LangfuseSpanClient, LangfuseGenerationClient, LangfusePromptClient, CreateLangfuseTraceBody, CreateLangfuseGenerationBody } from 'langfuse-core'; | ||
}; | ||
type LangfuseExtension = OpenAI & Pick<ReturnType<typeof LangfuseSingleton.getInstance>, "flushAsync">; | ||
type LangfuseExtension = OpenAI & Pick<ReturnType<typeof LangfuseSingleton.getInstance>, "flushAsync" | "shutdownAsync">; | ||
@@ -73,0 +73,0 @@ /** |
{ | ||
"name": "langfuse", | ||
"version": "3.29.1", | ||
"version": "3.29.2-alpha.0", | ||
"engines": { | ||
@@ -35,5 +35,5 @@ "node": ">=18" | ||
"dependencies": { | ||
"langfuse-core": "^3.29.1" | ||
"langfuse-core": "^3.29.2-alpha.0" | ||
}, | ||
"gitHead": "7961532988cdf5d4de810d3c783e4e98332578ad", | ||
"gitHead": "9a8c31ebf966ce9329e9f48d9ed3132fb3b1634d", | ||
"devDependencies": { | ||
@@ -40,0 +40,0 @@ "typedoc": "^0.26.8" |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
No v1
QualityPackage is not semver >=1. This means it is not stable and does not support ^ ranges.
Found 1 instance in 1 package
134175
1212
2