Files
langchain/tests/unit_tests
Joshua Snyder 59d054308c Add type inference for output parsers (#2769)
Currently, the output type of a number of OutputParser's `parse` methods
is `Any` when it can in fact be inferred.

This PR makes BaseOutputParser use a generic type and fixes the output
types of the following parsers:
- `PydanticOutputParser`
- `OutputFixingParser`
- `RetryOutputParser`
- `RetryWithErrorOutputParser`

The output of the `StructuredOutputParser` is corrected from `BaseModel`
to `Any` since there are no type guarantees provided by the parser.

Fixes issue #2715
2023-04-12 09:12:20 -07:00
..
2023-03-26 19:49:46 -07:00
2023-04-06 13:02:42 -07:00
2022-10-24 14:51:15 -07:00
2022-10-24 14:51:15 -07:00