mtyrrell commited on
Commit
ec8c2f5
1 Parent(s): e912183

openai issues

Browse files
Files changed (2) hide show
  1. app.py +3 -3
  2. utils.py +1 -2
app.py CHANGED
@@ -10,10 +10,10 @@ from langchain.docstore.document import Document
10
  from openai import OpenAI
11
  import utils # Import the utils module
12
 
13
- os.environ.pop("OPENAI_API_KEY", None)
14
- load_dotenv()
15
-
16
 
 
17
 
18
  # Initialize OpenAI client
19
  client = utils.get_openai_client()
 
10
  from openai import OpenAI
11
  import utils # Import the utils module
12
 
13
+ # os.environ.pop("OPENAI_API_KEY", None)
14
+ # load_dotenv()
 
15
 
16
+ openai_api_key = os.environ["OPEN_AI_KEY"]
17
 
18
  # Initialize OpenAI client
19
  client = utils.get_openai_client()
utils.py CHANGED
@@ -18,8 +18,7 @@ load_dotenv()
18
  def get_openai_client():
19
  return OpenAI(
20
  organization=os.getenv('OPENAI_ORG_ID'),
21
- project=os.getenv('OPENAI_PROJECT_ID'),
22
- api_key=os.getenv('OPENAI_API_KEY')
23
  )
24
 
25
  # Initialize embeddings
 
18
  def get_openai_client():
19
  return OpenAI(
20
  organization=os.getenv('OPENAI_ORG_ID'),
21
+ project=os.getenv('OPENAI_PROJECT_ID')
 
22
  )
23
 
24
  # Initialize embeddings