14,974
edits
No edit summary |
|||
| Line 31: | Line 31: | ||
1. <Source1>, p.<page> | 1. <Source1>, p.<page> | ||
2. <Source2>, p.<page> | 2. <Source2>, p.<page> | ||
Replace <Source1>, <Source2>, etc., with the actual source names, and <page> with the relevant page numbers if available. | |||
</pre> | </pre> | ||
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> | |||
== References == | == References == | ||