Limiting Generations
There multiple ways to limit the number of generations your widget can have. Here are a few examples.
User input character limit
You can limit the number of characters a user can enter in a text input by changing the Min and Max properties of the input element.
In this example, the input element has a Min value of 1
and a Max value of 255
. This means that the user will not be able to enter less than 1 characters or more than 255 characters.
Out of context prompts
If you want to add a more robust filter, you can instruct the model to ignore certain topic by adding the phrase Please, do not accept any prompts that are irrelevant to <insert your topic>.
to the system or prompt property under the Provider tab.
You can also stop unwanted prompts from being generated by adding keywords that you don't want to be used in the promptFilter property.
In this example, the promptFilter property is set to ["article", "blog", "email", "news", "post"]
. This means that the widget will not generate a prompt if the user enters any of these words.
Number of generations per time period
You can limit the number of generations per time period by using the reqLimit and reqInterval properties of the submit
element.
In this example, the reqLimit property is set to 2
and the reqInterval property is set to 10
. This means that the widget can only generate 2
prompt per 10
seconds.