Macro langchain_rust::template_fstring
source · macro_rules! template_fstring { ($template:expr, $($var:expr),* $(,)?) => { ... }; }
Expand description
template_fstring
is a utility macro that creates a new PromptTemplate
with FString as the template format.
§Usage
The macro is called with a template string and a list of variables that exist in the template. For example:
ⓘ
template_fstring!(
"Hello {name}",
"name"
)
This returns a PromptTemplate
object that contains the string “Hello {name}” as the template and [“name”] as the variables, with TemplateFormat set to FString.