niting089 commited on
Commit
2df233c
·
1 Parent(s): 8ddb839

Updated app,py

Browse files
Files changed (1) hide show
  1. app.py +8 -0
app.py CHANGED
@@ -15,6 +15,14 @@ from langchain_core.globals import set_llm_cache
15
  from langchain_core.caches import InMemoryCache
16
  import shutil
17
 
 
 
 
 
 
 
 
 
18
  # Initialize caches and embeddings
19
  store = LocalFileStore("./cache/")
20
  set_llm_cache(InMemoryCache())
 
15
  from langchain_core.caches import InMemoryCache
16
  import shutil
17
 
18
+ from dotenv import load_dotenv
19
+
20
+ # Load environment variables
21
+ load_dotenv()
22
+
23
+ # Set OpenAI API key
24
+ os.environ["OPENAI_API_KEY"] = os.getenv("OPENAI_API_KEY")
25
+
26
  # Initialize caches and embeddings
27
  store = LocalFileStore("./cache/")
28
  set_llm_cache(InMemoryCache())