antonyms for the following words.        Input: happy    Output: sad        Input: tall    Output: short        Input: funny    Output:Examples in the config‚ÄãThis shows an example of referencing the examples directly in the config.cat few_shot_prompt_examples_in.json    {        "_type": "few_shot",        "input_variables": ["adjective"],        "prefix": "Write antonyms for the following words.",        "example_prompt": {            "_type": "prompt",            "input_variables": ["input", "output"],            "template": "Input: {input}\nOutput: {output}"        },        "examples": [            {"input": "happy", "output": "sad"},            {"input": "tall", "output": "short"}        ],        "suffix": "Input: {adjective}\nOutput:"    }   prompt = load_prompt("few_shot_prompt_examples_in.json")print(prompt.format(adjective="funny"))    Write antonyms for the following words.        Input: happy    Output: sad        Input: tall    Output: short        Input: funny    Output:Example prompt from a file‚ÄãThis shows an example of loading the PromptTemplate that is used to format the examples from a separate file. Note that the key changes from example_prompt to example_prompt_path.cat example_prompt.json    {        "_type": "prompt",        "input_variables": ["input", "output"],        "template": "Input: {input}\nOutput: {output}"     }cat few_shot_prompt_example_prompt.json    {        "_type": "few_shot",        "input_variables": ["adjective"],        "prefix": "Write antonyms for the following words.",        "example_prompt_path": "example_prompt.json",        "examples": "examples.json",        "suffix": "Input: {adjective}\nOutput:"    }   prompt = load_prompt("few_shot_prompt_example_prompt.json")print(prompt.format(adjective="funny"))    Write antonyms for the following words.        Input: happy    Output: sad        Input: tall    Output: short        Input: funny    Output:PromptTemplate with OutputParser‚ÄãThis shows an example of loading a
It is often preferable to store prompts not as python code but as files. This can make it easy to share, store, and version prompts. This notebook covers how to do that in LangChain, walking through all the different types of prompts and the different serialization options.
It is often preferable to store prompts not as python code but as files. This can make it easy to share, store, and version prompts. This notebook covers how to do that in LangChain, walking through all the different types of prompts and the different serialization options. ->: antonyms for the following words.        Input: happy    Output: sad        Input: tall    Output: short        Input: funny    Output:Examples in the config‚ÄãThis shows an example of referencing the examples directly in the config.cat few_shot_prompt_examples_in.json    {        "_type": "few_shot",        "input_variables": ["adjective"],        "prefix": "Write antonyms for the following words.",        "example_prompt": {            "_type": "prompt",            "input_variables": ["input", "output"],            "template": "Input: {input}\nOutput: {output}"        },        "examples": [            {"input": "happy", "output": "sad"},            {"input": "tall", "output": "short"}        ],        "suffix": "Input: {adjective}\nOutput:"    }   prompt = load_prompt("few_shot_prompt_examples_in.json")print(prompt.format(adjective="funny"))    Write antonyms for the following words.        Input: happy    Output: sad        Input: tall    Output: short        Input: funny    Output:Example prompt from a file‚ÄãThis shows an example of loading the PromptTemplate that is used to format the examples from a separate file. Note that the key changes from example_prompt to example_prompt_path.cat example_prompt.json    {        "_type": "prompt",        "input_variables": ["input", "output"],        "template": "Input: {input}\nOutput: {output}"     }cat few_shot_prompt_example_prompt.json    {        "_type": "few_shot",        "input_variables": ["adjective"],        "prefix": "Write antonyms for the following words.",        "example_prompt_path": "example_prompt.json",        "examples": "examples.json",        "suffix": "Input: {adjective}\nOutput:"    }   prompt = load_prompt("few_shot_prompt_example_prompt.json")print(prompt.format(adjective="funny"))    Write antonyms for the following words.        Input: happy    Output: sad        Input: tall    Output: short        Input: funny    Output:PromptTemplate with OutputParser‚ÄãThis shows an example of loading a