Spaces:
Runtime error
Runtime error
Siddhant
commited on
environment variable method changed
Browse files
app.py
CHANGED
@@ -53,7 +53,7 @@ class ChatWrapper:
|
|
53 |
os.environ["OPENAI_API_KEY"] = ""
|
54 |
|
55 |
import openai
|
56 |
-
openai.api_key = os.environ
|
57 |
# Run chain and append input.
|
58 |
output = chain({"question": inp, "chat_history": history})["answer"]
|
59 |
history.append((inp, output))
|
|
|
53 |
os.environ["OPENAI_API_KEY"] = ""
|
54 |
|
55 |
import openai
|
56 |
+
openai.api_key = os.environ.get("OPENAI_API_KEY")
|
57 |
# Run chain and append input.
|
58 |
output = chain({"question": inp, "chat_history": history})["answer"]
|
59 |
history.append((inp, output))
|