Spaces:
Runtime error
Runtime error
Siddhant
commited on
environment variable method changed
Browse files
app.py
CHANGED
@@ -13,9 +13,9 @@ embeddings = OpenAIEmbeddings()
|
|
13 |
# PINECONE_API_KEY = '6af52b8a-a3df-4189-899b-b21163027bb8'
|
14 |
# PINECONE_API_ENV = 'asia-southeast1-gcp'
|
15 |
|
16 |
-
PINECONE_API_KEY = os.
|
17 |
-
PINECONE_API_ENV = os.
|
18 |
-
PINECONE_INDEX = os.
|
19 |
|
20 |
# initialize pinecone
|
21 |
pinecone.init(
|
@@ -26,7 +26,7 @@ pinecone.init(
|
|
26 |
index_name = PINECONE_INDEX
|
27 |
vectorstore = Pinecone.from_existing_index(index_name=index_name, embedding=embeddings)
|
28 |
|
29 |
-
api_key = os.
|
30 |
|
31 |
|
32 |
class ChatWrapper:
|
|
|
13 |
# PINECONE_API_KEY = '6af52b8a-a3df-4189-899b-b21163027bb8'
|
14 |
# PINECONE_API_ENV = 'asia-southeast1-gcp'
|
15 |
|
16 |
+
PINECONE_API_KEY = os.environ.get("PINECONE_API_KEY")
|
17 |
+
PINECONE_API_ENV = os.environ.get("PINECONE_API_ENV")
|
18 |
+
PINECONE_INDEX = os.environ.get("PINECONE_INDEX")
|
19 |
|
20 |
# initialize pinecone
|
21 |
pinecone.init(
|
|
|
26 |
index_name = PINECONE_INDEX
|
27 |
vectorstore = Pinecone.from_existing_index(index_name=index_name, embedding=embeddings)
|
28 |
|
29 |
+
api_key = os.environ.get("OPENAI_API_KEY")
|
30 |
|
31 |
|
32 |
class ChatWrapper:
|