Learn how to install and use PromptL in your project
Prerequisites: Ensure you have Node.js installed and access to an LLM provider like OpenAI or Anthropic.
prompt
variable defines the PromptL prompt, including configuration and template syntax.parameters
object passes the value topic: 'chickens'
to replace {{ topic }}
in the prompt.render
function processes the prompt and generates the messages
array and config
object for your LLM provider.messages
and config
to the model, generating a response.