refactor: import langchain-core
instead of langchain
in Langchain Python integration
#1789
Labels
langchain-core
instead of langchain
in Langchain Python integration
#1789
Describe the bug
langchain has been split into several slim packages, including langchain-core, langchain-<aws, ...>. Users, especially who are using LCEL, don't need to install the whole langchain package in their working environment.
However, the langfuse CallbackHanlder still takes a hard dependency on langchain, instead of langchain-core. See https://github.com/langfuse/langfuse-python/blob/main/langfuse/callback/langchain.py#L7
Modules here could be imported from langchain_core directly.
To reproduce
In a new python virtual environment, just install
Run the following will fail immediately
Additional information
No response
The text was updated successfully, but these errors were encountered: