Nicholas Bumgarner commited on
Commit
8f7952f
·
1 Parent(s): b918c0d

Support both phoenix and mixer engines in chat

Browse files
Files changed (1) hide show
  1. app.py +4 -3
app.py CHANGED
@@ -366,9 +366,10 @@ def phox_chat(message, history):
366
  return "Engine not initialized. Please wait for startup."
367
 
368
  with _state_lock:
369
- phoenix_running = _phoenix_proc is not None and _phoenix_proc.poll() is None
370
- if not phoenix_running:
371
- return "Phoenix is not running. Please click 'Start Engine' first."
 
372
 
373
  if _tokenizer is None:
374
  return "Tokenizer not loaded."
 
366
  return "Engine not initialized. Please wait for startup."
367
 
368
  with _state_lock:
369
+ engine_running = (_phoenix_proc is not None and _phoenix_proc.poll() is None) or \
370
+ (_mixer_proc is not None and _mixer_proc.poll() is None)
371
+ if not engine_running:
372
+ return "Engine not running. Please click 'Start Engine' or 'Start Mixer' first."
373
 
374
  if _tokenizer is None:
375
  return "Tokenizer not loaded."