| import sys |
| import os |
| import json |
| sys.path.append(os.path.abspath(os.path.join(os.path.dirname(__file__), "../saas/gradio"))) |
| import app |
| import decision_engine |
|
|
| print("Provider status:", decision_engine.provider_status()) |
|
|
| |
| profiles = app.SAMPLE_PROFILES |
| print("Available profiles:", list(profiles.keys())) |
|
|
| for name in profiles.keys(): |
| print(f"\n--- Testing profile: {name} ---") |
| plan = app.build_plan_object("EN", name, "", "Standard offline assistant") |
| app_state = app.build_decision_app_state( |
| "EN", |
| plan, |
| "", |
| simple_target="local_runtime", |
| target_mode="LocalFolder", |
| target_drive="C:/", |
| user_answers_json="{}", |
| operator_notes="", |
| decision_engine_required=True, |
| ) |
| |
| try: |
| decision = decision_engine.decide_internal_action(app_state) |
| print("Decision returned successfully!") |
| print("Decision:", decision.get("decision")) |
| print("Selected Model:", decision.get("selected_client_model_ref") or decision.get("selected_model")) |
| print("Selected Backend:", decision.get("selected_backend")) |
| print("Reasons:", decision.get("reasons")) |
| except Exception as e: |
| print(f"FAILED with exception: {type(e).__name__}: {e}") |
|
|