Error in writing AI code using template

Hello sir,
Still the same

Hi @aparna.kulkarni99

Can you share your Repl with us so that we can check the issue? To share your repl , click on invite option on the top right corner in replit and enter the email id support@boltiot.com.

Let us know once you have shared the repl

Hello sir
I have sent

1 Like

Hi @aparna.kulkarni99

I have checked your repl and there were two mistakes in your project.

  1. First, the API key in the secrets tab was incorrect. You had entered “from boltiotai import openai in place of API key”.
    Instead you have to generate the API key from API key section on training website copy that key and paste it in the secrets tab in replit.

  2. The variable OPEN_API_KEY was not matching with the secret variable as in the code you had written OPENAI_API_KEY. I have made the changes in this now.

For testing purpose I used my API key an it was working fine. Please generate the API key and insert it the secrets tab.

Below is the screenshot of the working code. If you still face any issue, please feel free to get back to us.