Update libs/langchain/langchain/schema/runnable/base.py

Co-authored-by: Eugene Yurtsev <eyurtsev@gmail.com>
This commit is contained in:
William FH 2023-08-18 09:21:05 -07:00 committed by Nuno Campos
parent c326751085
commit da18e177f1

View File

@ -1444,6 +1444,8 @@ class RunnableLambda(Runnable[Input, Output]):
if hasattr(self, "afunc"):
return await self._acall_with_config(self._ainvoke, input, config)
else:
# Delegating to super implementation of ainvoke.
# Uses asyncio executor to run the sync version (invoke)
return await super().ainvoke(input, config)