langchain
a7efa957 - Update base chain type hints (#7680)

Commit
2 years ago
Update base chain type hints (#7680) Addresses #7578. `run()` can return dictionaries, Pydantic objects or strings, so the type hints should reflect that. See the chain from `create_structured_output_chain` for an example of a non-string return type from `run()`. I've updated the BaseLLMChain return type hint from `str` to `Any`. Although, the differences between `run()` and `__call__()` seem less clear now. CC: @baskaryan Co-authored-by: Bagatur <baskaryan@gmail.com>
Author
Parents
Loading