mirror of https://github.com/hwchase17/langchain
Update examples to prevent confusing missing _type warning (#1391)
The YAML and JSON examples of prompt serialization now give a strange `No '_type' key found, defaulting to 'prompt'` message when you try to run them yourself or copy the format of the files. The reason for this harmless warning is that the _type key was not in the config files, which means they are parsed as a standard prompt. This could be confusing to new users (like it was confusing to me after upgrading from 0.0.85 to 0.0.86+ for my few_shot prompts that needed a _type added to the example_prompt config), so this update includes the _type key just for clarity. Obviously this is not critical as the warning is harmless, but it could be confusing to track down or be interpreted as an error by a new user, so this update should resolve that.pull/1393/head
parent
dda5259f68
commit
1989e7d4c2
@ -1,4 +1,5 @@
|
||||
{
|
||||
"_type": "prompt",
|
||||
"input_variables": ["input", "output"],
|
||||
"template": "Input: {input}\nOutput: {output}"
|
||||
}
|
||||
|
@ -1,4 +1,5 @@
|
||||
{
|
||||
"_type": "prompt",
|
||||
"input_variables": ["adjective", "content"],
|
||||
"template": "Tell me a {adjective} joke about {content}."
|
||||
}
|
||||
|
@ -1,4 +1,5 @@
|
||||
{
|
||||
"_type": "prompt",
|
||||
"input_variables": ["adjective", "content"],
|
||||
"template_path": "simple_template.txt"
|
||||
}
|
||||
|
Loading…
Reference in New Issue