Update app.py
Browse files
app.py
CHANGED
@@ -22,13 +22,13 @@ RAG_OFF = "Off"
|
|
22 |
RAG_CHROMA = "Chroma"
|
23 |
RAG_MONGODB = "MongoDB"
|
24 |
|
25 |
-
def invoke(openai_api_key,
|
26 |
if (openai_api_key == ""):
|
27 |
raise gr.Error("OpenAI API Key is required.")
|
28 |
-
if (rag_option is None):
|
29 |
-
raise gr.Error("Retrieval Augmented Generation is required.")
|
30 |
if (prompt == ""):
|
31 |
raise gr.Error("Prompt is required.")
|
|
|
|
|
32 |
|
33 |
if (RUN_RAG_BATCH):
|
34 |
run_rag_batch(config)
|
|
|
22 |
RAG_CHROMA = "Chroma"
|
23 |
RAG_MONGODB = "MongoDB"
|
24 |
|
25 |
+
def invoke(openai_api_key, prompt, rag_option):
|
26 |
if (openai_api_key == ""):
|
27 |
raise gr.Error("OpenAI API Key is required.")
|
|
|
|
|
28 |
if (prompt == ""):
|
29 |
raise gr.Error("Prompt is required.")
|
30 |
+
if (rag_option is None):
|
31 |
+
raise gr.Error("Retrieval Augmented Generation is required.")
|
32 |
|
33 |
if (RUN_RAG_BATCH):
|
34 |
run_rag_batch(config)
|