Temp
This commit is contained in:
Binary file not shown.
+9
-5
@@ -2,11 +2,14 @@ import asyncio
|
||||
from typing import List
|
||||
|
||||
import typer
|
||||
from dotenv import load_dotenv
|
||||
|
||||
from src.llm.models import CharacterStateUpdate, ExtractionResult, LoreUpdate
|
||||
from src.pipeline.orchestrator import PipelineOrchestrator
|
||||
from src.ui.tui import ConfirmationApp
|
||||
|
||||
load_dotenv()
|
||||
|
||||
app = typer.Typer(help="D&D Helpers CLI")
|
||||
|
||||
|
||||
@@ -17,14 +20,15 @@ def run():
|
||||
"""
|
||||
typer.echo("Starting D&D Helpers pipeline...")
|
||||
|
||||
loop = asyncio.get_event_loop()
|
||||
orchestrator = PipelineOrchestrator(loop=loop)
|
||||
async def main():
|
||||
loop = asyncio.get_running_loop()
|
||||
orchestrator = PipelineOrchestrator(loop=loop)
|
||||
await orchestrator.run()
|
||||
|
||||
try:
|
||||
loop.run_until_complete(orchestrator.run())
|
||||
asyncio.run(main())
|
||||
except KeyboardInterrupt:
|
||||
orchestrator.stop()
|
||||
loop.run_until_complete(asyncio.sleep(0)) # Give it a moment to cleanup
|
||||
pass
|
||||
|
||||
typer.echo("Pipeline stopped.")
|
||||
|
||||
|
||||
Reference in New Issue
Block a user