Update app.py
Browse files
app.py
CHANGED
@@ -9,10 +9,12 @@ os.environ["LANGCHAIN_PROJECT"] = "langgraph-multi-agent"
|
|
9 |
def invoke(openai_api_key, prompt):
|
10 |
if (openai_api_key == ""):
|
11 |
raise gr.Error("OpenAI API Key is required.")
|
|
|
|
|
12 |
|
13 |
os.environ["OPENAI_API_KEY"] = openai_api_key
|
14 |
|
15 |
-
return
|
16 |
|
17 |
gr.close_all()
|
18 |
|
|
|
9 |
def invoke(openai_api_key, prompt):
|
10 |
if (openai_api_key == ""):
|
11 |
raise gr.Error("OpenAI API Key is required.")
|
12 |
+
if (prompt == ""):
|
13 |
+
raise gr.Error("Prompt is required.")
|
14 |
|
15 |
os.environ["OPENAI_API_KEY"] = openai_api_key
|
16 |
|
17 |
+
return run_multi_agent(prompt)
|
18 |
|
19 |
gr.close_all()
|
20 |
|