|
|
|
|
|
""" |
|
|
CLI interface to test the Capital Project Orchestrator |
|
|
""" |
|
|
import sys |
|
|
import os |
|
|
|
|
|
|
|
|
sys.path.insert(0, os.path.join(os.path.dirname(os.path.dirname(os.path.abspath(__file__))), 'src')) |
|
|
|
|
|
from orchestrator.master_orchestrator import MasterOrchestrator |
|
|
|
|
|
def main(): |
|
|
print("\n๐๏ธ CAPITAL PROJECT EXECUTIVE DASHBOARD") |
|
|
print("="*80) |
|
|
|
|
|
|
|
|
orchestrator = MasterOrchestrator() |
|
|
|
|
|
|
|
|
example_queries = [ |
|
|
"What is the current supplier risk across our portfolio?", |
|
|
"Show me the contract exposure and CE backlog", |
|
|
"Are there any critical issues I should be aware of?", |
|
|
] |
|
|
|
|
|
print("\nExample queries:") |
|
|
for i, q in enumerate(example_queries, 1): |
|
|
print(f" {i}. {q}") |
|
|
|
|
|
print("\n" + "-"*80) |
|
|
|
|
|
|
|
|
while True: |
|
|
query = input("\n๐ฌ Enter your query (or 'q' to quit): ").strip() |
|
|
|
|
|
if query.lower() in ['q', 'quit', 'exit']: |
|
|
print("\n๐ Goodbye!") |
|
|
break |
|
|
|
|
|
if not query: |
|
|
continue |
|
|
|
|
|
|
|
|
result = orchestrator.orchestrate(query) |
|
|
|
|
|
|
|
|
print(orchestrator.format_output(result)) |
|
|
|
|
|
|
|
|
continue_prompt = input("\nPress Enter to ask another question or 'q' to quit: ").strip() |
|
|
if continue_prompt.lower() in ['q', 'quit', 'exit']: |
|
|
print("\n๐ Goodbye!") |
|
|
break |
|
|
|
|
|
if __name__ == "__main__": |
|
|
main() |