Skip to main content

GPT Prompt

This module is supposed to be used inside the normal chat flow. It is used to generate a response based on a prompt template, not necessarily a user message. Inside the prompt template you can use LoyJoy variables as well as expressions. The response is generated by the GPT model based on the prompt and the system message. The output is stored in the variable gpt_output.

Use Cases

The GPT prompt module is very flexible can be used in various use cases. Here are some examples:

  • Generate a JSON string to query an API based on user input
  • Generate a SQL query based on user input
  • Use the GPT model to make a decision based on user input