mirror of
https://github.com/hwchase17/langchain.git
synced 2025-09-03 12:07:36 +00:00
Test experimental package with langchain
on master
branch. (#9621)
It's possible that langchain-experimental works fine with the latest *published* langchain, but is broken with the langchain on `master`. Unfortunately, you can see this is currently the case — this is why this PR also includes a minor fix for the `langchain` package itself. We want to catch situations like that *before* releasing a new langchain, hence this test.
This commit is contained in:
@@ -528,9 +528,13 @@ class BaseLLM(BaseLanguageModel[str], ABC):
|
||||
f" argument of type {type(prompts)}."
|
||||
)
|
||||
# Create callback managers
|
||||
if isinstance(callbacks, list) and (
|
||||
isinstance(callbacks[0], (list, BaseCallbackManager))
|
||||
or callbacks[0] is None
|
||||
if (
|
||||
isinstance(callbacks, list)
|
||||
and callbacks
|
||||
and (
|
||||
isinstance(callbacks[0], (list, BaseCallbackManager))
|
||||
or callbacks[0] is None
|
||||
)
|
||||
):
|
||||
# We've received a list of callbacks args to apply to each input
|
||||
assert len(callbacks) == len(prompts)
|
||||
|
Reference in New Issue
Block a user