You need to create and cloudflare worker and copy and paste the code in there. Therefore you need a free cloudflare account:
You must have a Cloudflare account to create a Worker. To get started with Cloudflare and create an account, refer to Get started with Cloudflare.
To create your first Worker using the Cloudflare dashboard:
- Log in to the Cloudflare dashboard ↗ and select your account.
- Select Workers & Pages > Create application.
- Select Create Worker > Deploy.
Than you need to create an OpenAI api key, and go to you worker under Setting and put it in with the text: OPENAI_API_KEY