Spaces:
Running
Running
Update app.py
Browse files
app.py
CHANGED
@@ -8,9 +8,9 @@ lock = threading.Lock()
|
|
8 |
LLM = "gpt-4o"
|
9 |
|
10 |
def invoke(openai_api_key, topic):
|
11 |
-
if
|
12 |
raise gr.Error("OpenAI API Key is required.")
|
13 |
-
if
|
14 |
raise gr.Error("Topic is required.")
|
15 |
|
16 |
agentops.init(os.environ["AGENTOPS_API_KEY"])
|
|
|
8 |
LLM = "gpt-4o"
|
9 |
|
10 |
def invoke(openai_api_key, topic):
|
11 |
+
if not openai_api_key:
|
12 |
raise gr.Error("OpenAI API Key is required.")
|
13 |
+
if not topic:
|
14 |
raise gr.Error("Topic is required.")
|
15 |
|
16 |
agentops.init(os.environ["AGENTOPS_API_KEY"])
|