diff --git a/docs/snippets/modules/model_io/output_parsers/comma_separated.mdx b/docs/snippets/modules/model_io/output_parsers/comma_separated.mdx index b53c6d48a4..656bd78f56 100644 --- a/docs/snippets/modules/model_io/output_parsers/comma_separated.mdx +++ b/docs/snippets/modules/model_io/output_parsers/comma_separated.mdx @@ -5,34 +5,24 @@ from langchain.llms import OpenAI from langchain.chat_models import ChatOpenAI output_parser = CommaSeparatedListOutputParser() -``` - -```python format_instructions = output_parser.get_format_instructions() prompt = PromptTemplate( template="List five {subject}.\n{format_instructions}", input_variables=["subject"], partial_variables={"format_instructions": format_instructions} ) -``` - -```python model = OpenAI(temperature=0) -``` - -```python _input = prompt.format(subject="ice cream flavors") output = model(_input) -``` - -```python output_parser.parse(output) ``` +The resulting output will be: + ```