feat: wait until llm processor is ready

This commit is contained in:
Jan Häusler 2025-07-03 01:51:34 +02:00
parent b5fb3642bb
commit eb704bf23f

View file

@ -35,6 +35,8 @@ def main():
# if test flag set from args, process text # if test flag set from args, process text
print("trace: sys.argv", sys.argv) print("trace: sys.argv", sys.argv)
if any("--test-llm" in arg for arg in sys.argv): if any("--test-llm" in arg for arg in sys.argv):
while not llm_processor.initialized:
time.sleep(1)
llm_processor.process_text("hello LLM", lambda result: print(f"\nLLM Response:\n{result}\n")) llm_processor.process_text("hello LLM", lambda result: print(f"\nLLM Response:\n{result}\n"))
# Initialize speech-to-text if enabled # Initialize speech-to-text if enabled