Spaces:
Runtime error
Runtime error
andreasmartin
commited on
Commit
•
8f409cd
1
Parent(s):
640fa7c
deepnote update
Browse files
app.py
CHANGED
@@ -93,6 +93,8 @@ def get_retriever(context_state: str, vectordb):
|
|
93 |
|
94 |
@cl.langchain_factory(use_async=True)
|
95 |
def factory():
|
|
|
|
|
96 |
df_agent = load_agent()
|
97 |
load_vectordb()
|
98 |
user_session.set("context_state", "")
|
|
|
93 |
|
94 |
@cl.langchain_factory(use_async=True)
|
95 |
def factory():
|
96 |
+
if not os.environ["OPENAI_API_KEY"]:
|
97 |
+
os.environ["OPENAI_API_KEY"] = cl.user_session.get("env").get("OPENAI_API_KEY")
|
98 |
df_agent = load_agent()
|
99 |
load_vectordb()
|
100 |
user_session.set("context_state", "")
|