I’m working on building a website that uses GPT-3 to generate email templates. I want to start letting people test out but every time someone generates a template It will cost me money.
Could you help me figure how to allow each easier to only be able to press the generate button 5 times then it will disappear after its pressed 5 times? The token image adds a +1 everytime the generate button is clicked. So once that number hits 5 the button should disappear.
Thanks for the post and cool app!
This can definitely be done. Depending on how permanently you want to track this, there are a couple of ways you could do it. For instance, even if the user us logged out, Bubble will allow you to use a user record with them temporarily and the values are stored temporarily.
So, you could have an ‘attempts’ number field or something similar. Each time the button is clicked, you could take the existing value, add one and save the new value. Then on the page, you’ll use a conditional to hide the button anytime the current user’s attempts ≥ 5.
Give it a try and don’t hesitate to reach out to us directly at [email protected] with any additional questions.