Spaces:
Runtime error
Runtime error
Larry Yin
commited on
Commit
•
ee98642
1
Parent(s):
db6f7db
Read secrets
Browse files
app.py
CHANGED
@@ -7,8 +7,17 @@ from langchain.chat_models import ChatOpenAI
|
|
7 |
from langchain.chains import ConversationalRetrievalChain
|
8 |
from langchain.memory import ConversationTokenBufferMemory
|
9 |
|
10 |
-
openai.api_key = OPENAI_API_KEY
|
11 |
-
hf_api_key = HF_API_KEY
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
12 |
|
13 |
embedding = OpenAIEmbeddings()
|
14 |
|
|
|
7 |
from langchain.chains import ConversationalRetrievalChain
|
8 |
from langchain.memory import ConversationTokenBufferMemory
|
9 |
|
10 |
+
openai.api_key = os.environ['OPENAI_API_KEY']
|
11 |
+
hf_api_key = os.environ['HF_API_KEY']
|
12 |
+
host = os.environ['host']
|
13 |
+
port = os.environ['port']
|
14 |
+
database_name = os.environ['database_name']
|
15 |
+
user = os.environ['user']
|
16 |
+
passwd = os.environ['passwd']
|
17 |
+
COLLECTION_NAME = os.environ['COLLECTION_NAME']
|
18 |
+
memory_token_limit = os.environ['memory_token_limit']
|
19 |
+
llm_name = os.environ['llm_name']
|
20 |
+
bot_name = os.environ['bot_name']
|
21 |
|
22 |
embedding = OpenAIEmbeddings()
|
23 |
|