Hi all, since many of the features overlap across the core application and the client sdks, we centralize issues in the main application repo: langfuse/langfuse (filter by Javascript SDK)
Add Langchain Integration to the JS/TS SDKs which currently only exists in the Python SDKs.
Why is this important? Reducing the integration effort is key to help more people use Langfuse for their project. The Langchain intgeration (Python only) is currently the fastest way to integrate. It would be awesome if this was also usable for JS/TS Langchain projects.
Currently, the Langfuse SDK is not able to take environment variables for configuration. Instead, it relies on options on the constructor.
We want to have one function, which takes params: { publicKey?: string; secretKey?: string } & LangfuseCoreOptions and returns the same type.
This function should have the following behavior:
check if values for publicKey, secretKey, or variables within LangfuseCoreOptions were provided.
If not, check the environment variables and take values from there.
If still no variable was defined, log an error if the input param was required but not provided by either the constructor or the env variable. No exception is thrown.
use existing getEnv utility to access environment variables
the following variables are available:
LANGFUSE_RELEASE
LANGFUSE_PUBLIC_KEY
LANGFUSE_SECRET_KEY
LANGFUSE_DEBUG
LANGFUSE_HOST
Please adjust all environment variables in the CI and tests to reflect the change.
The function should be called as first action in the two Langfuse objects (