langchain_core.runnables.config
.run_in_executorΒΆ
- async langchain_core.runnables.config.run_in_executor(executor_or_config: ~typing.Optional[~typing.Union[~concurrent.futures._base.Executor, ~langchain_core.runnables.config.RunnableConfig]], func: ~typing.Callable[[~P], ~langchain_core.runnables.config.T], *args: ~typing.~P, **kwargs: ~typing.~P) T [source]ΒΆ
Run a function in an executor.
- Parameters
executor (Executor) β The executor.
func (Callable[P, Output]) β The function.
*args (Any) β The positional arguments to the function.
**kwargs (Any) β The keyword arguments to the function.
- Returns
The output of the function.
- Return type
Output