Overview

In this guide, you will learn how to set up Casper’s built-in Xano integration. This is necessary to bypass Bubble’s 60 second API request timeout. GPT-4’s API can take longer than 60 seconds to respond, which means that any medium to large prompt you send will not return a response when using native Bubble API connector.

Have these things ready before starting:

Video

(Coming Soon)

Step-By-Step Guide

Xano Setup

Xano allows us to package everything you need into a ‘Snippet,’ which you can install with a few clicks.

1. Install our Snippet to your Xano Instance

Navigate to https://www.xano.com/snippet/szLHpp_R and install the snippet to your Xano instance. Once it is installed, click the “Go to Instance” button.

2. Complete installation in the Xano dashboard

Once you are on your dashboard, navigate to Marketplace > Purchased, select ‘Casper+Xano OpenAI Integration,’ and click the green Install button.

3. Navigate to the /process_request endpoint

After you have installed the snippet, navigate to the API tab. Click the ‘View’ button on the Casper OpenAI API group, and click ‘Edit this endpoint’ on the /process_request endpoint.

4. Add your OpenAI API key

Click on the function in the function stack to modify it’s input data. In the openai_api_key_header field, replace [YOUR API KEY] with your actual OpenAI API key. Save your changes to that function. Then, publish your changes to the live version of the /process_request endpoint by clicking the green ‘Publish’ button. This is a GIF showing you the process: