Update app.py
Browse files
app.py
CHANGED
@@ -127,7 +127,7 @@ def rag_chain(llm, prompt, db):
|
|
127 |
return result["result"]
|
128 |
|
129 |
def invoke(openai_api_key, rag_option, prompt):
|
130 |
-
if (openai_api_key == ""):
|
131 |
#raise gr.Error("OpenAI API Key is required.")
|
132 |
openai_api_key= OAI_API_KEY
|
133 |
if (rag_option is None):
|
|
|
127 |
return result["result"]
|
128 |
|
129 |
def invoke(openai_api_key, rag_option, prompt):
|
130 |
+
if (openai_api_key == "" or openai_api_key == "sk-"):
|
131 |
#raise gr.Error("OpenAI API Key is required.")
|
132 |
openai_api_key= OAI_API_KEY
|
133 |
if (rag_option is None):
|