bstraehle commited on
Commit
ab457fe
1 Parent(s): 39669cd

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +3 -3
app.py CHANGED
@@ -7,12 +7,12 @@ lock = threading.Lock()
7
 
8
  LLM = "gpt-4o"
9
 
10
- def invoke(openai_api_key, msg):
11
  if not openai_api_key:
12
  raise gr.Error("OpenAI API Key is required.")
13
 
14
- if not task:
15
- raise gr.Error("Task is required.")
16
 
17
  with lock:
18
  os.environ["OPENAI_API_KEY"] = openai_api_key
 
7
 
8
  LLM = "gpt-4o"
9
 
10
+ def invoke(openai_api_key, message):
11
  if not openai_api_key:
12
  raise gr.Error("OpenAI API Key is required.")
13
 
14
+ if not message:
15
+ raise gr.Error("Message is required.")
16
 
17
  with lock:
18
  os.environ["OPENAI_API_KEY"] = openai_api_key