the capital of france?")output = model(_input.to_string())output_parser.parse(output)    {'answer': 'Paris',     'source': 'https://www.worldatlas.com/articles/what-is-the-capital-of-france.html'}And here's an example of using this in a chat modelchat_model = ChatOpenAI(temperature=0)prompt = ChatPromptTemplate(    messages=[        HumanMessagePromptTemplate.from_template("answer the users question as best as possible.\n{format_instructions}\n{question}")    ],    input_variables=["question"],    partial_variables={"format_instructions": format_instructions})_input = prompt.format_prompt(question="what's the capital of france?")output = chat_model(_input.to_messages())output_parser.parse(output.content)    {'answer': 'Paris', 'source': 'https://en.wikipedia.org/wiki/Paris'}PreviousRetry parserNextXML parserCommunityDiscordTwitterGitHubPythonJS/TSMoreHomepageBlogCopyright ¬© 2023 LangChain, Inc.
This output parser can be used when you want to return multiple fields. While the Pydantic/JSON parser is more powerful, we initially experimented with data structures having text fields only.
This output parser can be used when you want to return multiple fields. While the Pydantic/JSON parser is more powerful, we initially experimented with data structures having text fields only. ->: the capital of france?")output = model(_input.to_string())output_parser.parse(output)    {'answer': 'Paris',     'source': 'https://www.worldatlas.com/articles/what-is-the-capital-of-france.html'}And here's an example of using this in a chat modelchat_model = ChatOpenAI(temperature=0)prompt = ChatPromptTemplate(    messages=[        HumanMessagePromptTemplate.from_template("answer the users question as best as possible.\n{format_instructions}\n{question}")    ],    input_variables=["question"],    partial_variables={"format_instructions": format_instructions})_input = prompt.format_prompt(question="what's the capital of france?")output = chat_model(_input.to_messages())output_parser.parse(output.content)    {'answer': 'Paris', 'source': 'https://en.wikipedia.org/wiki/Paris'}PreviousRetry parserNextXML parserCommunityDiscordTwitterGitHubPythonJS/TSMoreHomepageBlogCopyright ¬© 2023 LangChain, Inc.