Skip to content

Forum in maintenance, we will back soon 🙂

Small error in scri...
 
Notifications
Clear all

Small error in script.js in Connect The UI With The Snippet - Wrong action is invoked

2 Posts
2 Users
2 Reactions
127 Views
(@rene-koch)
Posts: 1
New Member Customer Registered
Topic starter
 

Hi,

i'm learning to re-create the hook-generator and copied the script.js from the course page. But i always got an error.

There is a mismatch in the script.js

var data = new FormData();
data.append('action', 'generate_hooks_basic');
data.append('topic', topic);
data.append('usage', usage);
 
It is calling a different action, than we have created in our snippet: called openai_generate_text_basic
 
If i replace in script.js the action name with openai_generate_text_basic it is working fine (after adding the CORS headers).
Have i missed a step?

Keep up the excellent work!

This topic was modified 5 months ago 2 times by Rene Koch
 
Posted : 08/04/2024 8:13 am
(@husein)
Posts: 550
Member Moderator
 

@rene-koch The generate_hooks_basic is anothet function which has a different prompt, so make sure you create the code snippet and add the respective function to it if you want to test it too. And if it still doesn't work please attach the code and your website's link so that i can test it from my side.

 
Posted : 08/04/2024 11:48 am
SSAdvisor reacted
Share:
[the_ad_group id="312"]