eaglelandsonce commited on
Commit
049b114
·
verified ·
1 Parent(s): ab7a9e1

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +2 -1
app.py CHANGED
@@ -172,7 +172,8 @@ def create_demo():
172
  async def process_input(space_system_description, history, api_key):
173
  nonlocal space_crew
174
  if not api_key:
175
- return [{"role": "assistant", "content": "Please provide an OpenAI API key."}]
 
176
 
177
  if space_crew is None:
178
  space_crew = SpaceSystemCrew(api_key=api_key)
 
172
  async def process_input(space_system_description, history, api_key):
173
  nonlocal space_crew
174
  if not api_key:
175
+ yield [{"role": "assistant", "content": "Please provide an OpenAI API key."}]
176
+ return
177
 
178
  if space_crew is None:
179
  space_crew = SpaceSystemCrew(api_key=api_key)