mirror of
https://github.com/hwchase17/langchain.git
synced 2025-06-01 20:49:17 +00:00
For me, the [Pydantic example](https://python.langchain.com/docs/how_to/structured_output/#choosing-between-multiple-schemas) does not work (tested on various Python versions from 3.10 to 3.12, and `Pydantic` versions from 2.7 to 2.9). The `TypedDict` example (added in this PR) does. ---- Additionally, fixed an error in [Using PydanticOutputParser example](https://python.langchain.com/docs/how_to/structured_output/#using-pydanticoutputparser). Was: ```python query = "Anna is 23 years old and she is 6 feet tall" print(prompt.invoke(query).to_string()) ``` Corrected to: ```python query = "Anna is 23 years old and she is 6 feet tall" print(prompt.invoke({"query": query}).to_string()) ``` --------- Co-authored-by: Eugene Yurtsev <eyurtsev@gmail.com> |
||
---|---|---|
.. | ||
api_reference | ||
cassettes | ||
data | ||
docs | ||
scripts | ||
src | ||
static | ||
.gitignore | ||
.yarnrc.yml | ||
babel.config.js | ||
docusaurus.config.js | ||
ignore-step.sh | ||
Makefile | ||
package.json | ||
README.md | ||
sidebars.js | ||
vercel_requirements.txt | ||
vercel.json | ||
yarn.lock |
LangChain Documentation
For more information on contributing to our documentation, see the Documentation Contributing Guide