langchain/libs
Alex Stachowiak a7efa95775
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>
2023-07-24 21:16:41 -07:00
..
experimental docstrings experimental (#7969) 2023-07-24 14:21:48 -07:00
langchain Update base chain type hints (#7680) 2023-07-24 21:16:41 -07:00