2 ms·
Langchain also has a built in Pydantic output parser https://python.langchain.com/en/latest/modules/prompts/output_parsers/examples/pydantic.html https://python
by lharries 3y ago
Langchain also has a built in Pydantic output parser https://python.langchain.com/en/latest/modules/prompts/output_parsers/examples/pydantic.html https://python.langchain.com/en/latest/modules/prompts/outpu...
However I've found it to be generally unreliable and adds a lot of text to each call.
I suspect this can be improved by:
- Only writing the parts of the spec which are needed, rather than the full JSON schema spec
- Including relevant examples rather than arbitrary JSON schema examples