Forum Discussion
How can I link Storyline with Chatgpt to create chatbot?
Hi All,
Could you please share with me a detailed explanation on how to link Storyline with chatgpt and perhaps creating a chatbot and other stuff?
Thank you!
- GarimaGupta-473Community Member
Hi Ahmed,
To integrate Storyline with ChatGPT, you 'll use JavaScript within your Storyline project to make API calls to OpenAI’s (or another LLM's) servers (you'll need an API key from them).
The process begins by creating variables in Storyline to capture user input and store the AI-generated response. You'll then need to add a button that triggers the JavaScript code, which sends the user's input as a prompt to ChatGPT and retrieves the response to display it in your Storyline course. This involves embedding specific JavaScript code that handles the API calls, manages the interaction with ChatGPT, and processes the returned data to provide real-time responses within your eLearning module. (You can use chatGPT to write this code for you, btw).
However, this should not be used as-is for production quality work that goes out to learners, as it exposes your api key and has other potential risks. You will need to configure/build a middleware server that SL will connect to first. This is the only secure way of doing so. I made a video on this a while ago: https://youtu.be/SApHV9uM0Aw. Once you have this down, you can build any AI enabled activity directly in Storyline (including chatbot), and it works beautifully in LMSs.
full disclosure: We offer this as a subscription service for teams that can't build their own server/code. Our team builds out the whole secure tech stack, api keys and code for you, and you can start building your AI interactions in SL right away. See here for details: www.aiforlnd.com
Garima
www.arthalearning.com