LangChain.PromptTemplate (langchainex v0.2.3)

a PromptTemplate is just a normal string template, you can pass it a set of values and it will interpolate them. You can also partially evaluate the template by calling the partial/2 function input_variables will contain the list of variables that still need to be specified to complete the template.

Link to this section Summary

Functions

converts to eex and then interpolates the values+partial_variables. (eex wants values and partial_variables to be specified as a map with atomic keys)

partially apply the variables in 'partial' to the partial_variables and remove them from the input_variables

Link to this section Functions

Link to this function

format(template, values)

converts to eex and then interpolates the values+partial_variables. (eex wants values and partial_variables to be specified as a map with atomic keys)

Link to this function

partial(template, partial)

partially apply the variables in 'partial' to the partial_variables and remove them from the input_variables