Do I need any environment variables set to execute some code, call openai's api, and return a response?

Advertisements I was going through a course in OpenAI’s API using an in-browser jupyter notebook page but wanted to copy some example code from there into a local IDE. I installed Python and the jupyter extention in VS Code and the OpenAI library. My code is below: import openai import os # from dotenv import… Read More Do I need any environment variables set to execute some code, call openai's api, and return a response?

Firebase + React auth not working with my .env

Advertisements So i’ve read many topics and lose so much time cause of this issue. My components don’t load anymore and i’m receiving this error in my console : ‘FirebaseError: Firebase: Error (auth/invalid-api-key).’ (I specify that is my first project using firebase). About my firebase.config.js : import firebase from ‘firebase/compat/app’; import ‘firebase/compat/auth’; const app =… Read More Firebase + React auth not working with my .env

How can I pass environment variables by using dotenv in react app ? I get undefined

Advertisements This is my react fontend app. to pass data from node.js backend, I need to successfully pass API’s url. currently im setting the address to my localhost. I am struggling to path process.env.API_URL to my config file. my files structure is .src – config * config.js – .env .webpack.config.js my .env file is API_URL=http://localhost:3006… Read More How can I pass environment variables by using dotenv in react app ? I get undefined