14,974
edits
| Line 37: | Line 37: | ||
To display curly braces as plain text in your prompt, use double curly braces {{kbd | key=<nowiki>{{</nowiki>}} and {{kbd | key=<nowiki>}}</nowiki>}} for escaping. Alternatively, you can replace them with {{kbd | key=<nowiki><</nowiki>}} and {{kbd | key=<nowiki>></nowiki>}} if that fits your use case. | To display curly braces as plain text in your prompt, use double curly braces {{kbd | key=<nowiki>{{</nowiki>}} and {{kbd | key=<nowiki>}}</nowiki>}} for escaping. Alternatively, you can replace them with {{kbd | key=<nowiki><</nowiki>}} and {{kbd | key=<nowiki>></nowiki>}} if that fits your use case. | ||
Be cautious when using curly braces {{kbd | key=<nowiki>{xxx}</nowiki>}} in LangChain prompts - they're interpreted as variable placeholders. If you include them in your prompt, you must provide corresponding Python variables to pass these values. Be cautious when using curly braces {{kbd | key=<nowiki>{xxx}</nowiki>}} in LangChain prompts - they're interpreted as variable placeholders. If you include them in your prompt, you must provide corresponding Python variables to pass these values.<ref>[https://github.com/langchain-ai/langchain/issues/10639 When I use a prompt with "{", I get an error · Issue #10639 · langchain-ai/langchain]</ref> | Be cautious when using curly braces {{kbd | key=<nowiki>{xxx}</nowiki>}} in LangChain prompts - they're interpreted as variable placeholders. If you include them in your prompt, you must provide corresponding Python variables to pass these values. Be cautious when using curly braces {{kbd | key=<nowiki>{{xxx}}</nowiki>}} in LangChain prompts - they're interpreted as variable placeholders. If you include them in your prompt, you must provide corresponding Python variables to pass these values.<ref>[https://github.com/langchain-ai/langchain/issues/10639 When I use a prompt with "{", I get an error · Issue #10639 · langchain-ai/langchain]</ref> | ||
== References == | == References == | ||