mirror of
https://github.com/hwchase17/langchain
synced 2024-10-29 17:07:25 +00:00
9c0cb90997
# Resolve error in StructuredOutputParser docs Documentation for `StructuredOutputParser` currently not reproducible, that is, `output_parser.parse(output)` raises an error because the LLM returns a response with an invalid format ```python _input = prompt.format_prompt(question="what's the capital of france") output = model(_input.to_string()) output # ? # # ```json # { # "answer": "Paris", # "source": "https://www.worldatlas.com/articles/what-is-the-capital-of-france.html" # } # ``` ``` Was fixed by adding a question mark to the prompt |
||
---|---|---|
.. | ||
example_selectors/examples | ||
output_parsers | ||
prompt_templates | ||
chat_prompt_template.ipynb | ||
example_selectors.rst | ||
getting_started.ipynb | ||
output_parsers.rst | ||
prompt_templates.rst |