datboyalex commited on
Commit
0c0355b
·
verified ·
1 Parent(s): 68db29d

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +1 -5
app.py CHANGED
@@ -63,12 +63,8 @@ vector_store = FAISS.from_texts(
63
  metadatas=metadatas
64
  )
65
  # Step 5: Initialize the LLM
66
- #openai_api_key = os.getenv("tauhid") # Fetch the key using the actual secret name
67
-
68
  openai_api_key = os.getenv("tauhid")
69
- client = OpenAI(api_key=api_key)
70
- if not openai_api_key:
71
- raise ValueError("tauhid environment variable is not set. Please add it to the Space Secrets.")
72
 
73
  # Initialize the LLM
74
  llm = ChatOpenAI(
 
63
  metadatas=metadatas
64
  )
65
  # Step 5: Initialize the LLM
 
 
66
  openai_api_key = os.getenv("tauhid")
67
+ print(f"API key retrieved: {'[NOT FOUND]' if not openai_api_key else '[FOUND - first 4 chars: ' + openai_api_key[:4] + ']'}")
 
 
68
 
69
  # Initialize the LLM
70
  llm = ChatOpenAI(