example can stream through partial outputs:from langchain.output_parsers.json import SimpleJsonOutputParserjson_prompt = PromptTemplate.from_template("Return a JSON object with an `answer` key that answers the following question: {question}")json_parser = SimpleJsonOutputParser()json_chain = json_prompt | model | json_parserlist(json_chain.stream({"question": "Who invented the microscope?"}))    [{},     {'answer': ''},     {'answer': 'Ant'},     {'answer': 'Anton'},     {'answer': 'Antonie'},     {'answer': 'Antonie van'},     {'answer': 'Antonie van Lee'},     {'answer': 'Antonie van Leeu'},     {'answer': 'Antonie van Leeuwen'},     {'answer': 'Antonie van Leeuwenho'},     {'answer': 'Antonie van Leeuwenhoek'}]While the PydanticOutputParser cannot:list(chain.stream({"query": "Tell me a joke."}))    [Joke(setup='Why did the chicken cross the road?', punchline='To get to the other side!')]PreviousStreamingNextList parserGet startedLCELCommunityDiscordTwitterGitHubPythonJS/TSMoreHomepageBlogCopyright ¬© 2023 LangChain, Inc.
Language models output text. But many times you may want to get more structured information than just text back. This is where output parsers come in.
Language models output text. But many times you may want to get more structured information than just text back. This is where output parsers come in. ->: example can stream through partial outputs:from langchain.output_parsers.json import SimpleJsonOutputParserjson_prompt = PromptTemplate.from_template("Return a JSON object with an `answer` key that answers the following question: {question}")json_parser = SimpleJsonOutputParser()json_chain = json_prompt | model | json_parserlist(json_chain.stream({"question": "Who invented the microscope?"}))    [{},     {'answer': ''},     {'answer': 'Ant'},     {'answer': 'Anton'},     {'answer': 'Antonie'},     {'answer': 'Antonie van'},     {'answer': 'Antonie van Lee'},     {'answer': 'Antonie van Leeu'},     {'answer': 'Antonie van Leeuwen'},     {'answer': 'Antonie van Leeuwenho'},     {'answer': 'Antonie van Leeuwenhoek'}]While the PydanticOutputParser cannot:list(chain.stream({"query": "Tell me a joke."}))    [Joke(setup='Why did the chicken cross the road?', punchline='To get to the other side!')]PreviousStreamingNextList parserGet startedLCELCommunityDiscordTwitterGitHubPythonJS/TSMoreHomepageBlogCopyright ¬© 2023 LangChain, Inc.