computer-use-ootb-internal 0.0.117__py3-none-any.whl → 0.0.118__py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- computer_use_ootb_internal/app_teachmode.py +43 -25
- {computer_use_ootb_internal-0.0.117.dist-info → computer_use_ootb_internal-0.0.118.dist-info}/METADATA +1 -1
- {computer_use_ootb_internal-0.0.117.dist-info → computer_use_ootb_internal-0.0.118.dist-info}/RECORD +5 -5
- {computer_use_ootb_internal-0.0.117.dist-info → computer_use_ootb_internal-0.0.118.dist-info}/WHEEL +0 -0
- {computer_use_ootb_internal-0.0.117.dist-info → computer_use_ootb_internal-0.0.118.dist-info}/entry_points.txt +0 -0
@@ -467,31 +467,20 @@ def process_input():
|
|
467
467
|
def main():
|
468
468
|
# Logging is set up at the top level now
|
469
469
|
logging.info("App main() function starting setup.")
|
470
|
-
global app, shared_state, rate_limiter
|
471
|
-
|
472
|
-
|
473
|
-
|
474
|
-
)
|
475
|
-
parser.add_argument("--
|
476
|
-
parser.add_argument("--
|
477
|
-
parser.add_argument("--
|
478
|
-
parser.add_argument("--
|
479
|
-
parser.add_argument("--
|
480
|
-
parser.add_argument("--api_key_file", default="api_key.json")
|
481
|
-
parser.add_argument("--api_keys", default="")
|
482
|
-
parser.add_argument(
|
483
|
-
"--server_url",
|
484
|
-
default="http://ec2-44-234-43-86.us-west-2.compute.amazonaws.com",
|
485
|
-
help="Server URL for the session"
|
486
|
-
)
|
487
|
-
parser.add_argument("--host", type=str, default="127.0.0.1", help="Host to bind the server to")
|
488
|
-
parser.add_argument("--port", type=int, default=8000, help="Port to bind the server to") # Default port
|
470
|
+
global app, shared_state, rate_limiter # Ensure app is global if needed by uvicorn
|
471
|
+
parser = argparse.ArgumentParser()
|
472
|
+
# Add arguments, but NOT host and port
|
473
|
+
parser.add_argument("--model", type=str, default="teach-mode-gpt-4o", help="Model name")
|
474
|
+
parser.add_argument("--task", type=str, default="Following the instructions to complete the task.", help="Initial task description")
|
475
|
+
parser.add_argument("--selected_screen", type=int, default=0, help="Selected screen index")
|
476
|
+
parser.add_argument("--user_id", type=str, default="hero_cases", help="User ID for the session")
|
477
|
+
parser.add_argument("--trace_id", type=str, default="build_scroll_combat", help="Trace ID for the session")
|
478
|
+
parser.add_argument("--api_keys", type=str, default="sk-proj-1234567890", help="API keys")
|
479
|
+
parser.add_argument("--server_url", type=str, default="http://ec2-44-234-43-86.us-west-2.compute.amazonaws.com", help="Server URL for the session")
|
489
480
|
|
490
481
|
args = parser.parse_args()
|
491
|
-
shared_state = SharedState(args)
|
492
|
-
rate_limiter = RateLimiter(interval_seconds=2)
|
493
482
|
|
494
|
-
# Validate args or set defaults if needed
|
483
|
+
# Validate args or set defaults if needed (keep these)
|
495
484
|
if not hasattr(args, 'model'): args.model = "default_model"
|
496
485
|
if not hasattr(args, 'task'): args.task = "default_task"
|
497
486
|
if not hasattr(args, 'selected_screen'): args.selected_screen = 0
|
@@ -500,11 +489,40 @@ def main():
|
|
500
489
|
if not hasattr(args, 'api_keys'): args.api_keys = "none"
|
501
490
|
if not hasattr(args, 'server_url'): args.server_url = "none"
|
502
491
|
|
503
|
-
|
492
|
+
shared_state = SharedState(args)
|
493
|
+
rate_limiter = RateLimiter(interval_seconds=2) # Re-initialize rate limiter
|
494
|
+
logging.info(f"Shared state initialized for user: {args.user_id}")
|
495
|
+
|
496
|
+
# --- Restore original port calculation logic ---
|
497
|
+
port = 7888 # Default port
|
498
|
+
host = "0.0.0.0" # Listen on all interfaces
|
499
|
+
|
500
|
+
if platform.system() == "Windows":
|
501
|
+
try:
|
502
|
+
username = os.environ["USERNAME"].lower()
|
503
|
+
logging.info(f"Determining port based on Windows username: {username}")
|
504
|
+
if username == "altair":
|
505
|
+
port = 14000
|
506
|
+
elif username.startswith("guest") and username[5:].isdigit():
|
507
|
+
num = int(username[5:])
|
508
|
+
if 1 <= num <= 10: # Assuming max 10 guests for this range
|
509
|
+
port = 14000 + num
|
510
|
+
else:
|
511
|
+
logging.warning(f"Guest user number {num} out of range (1-10), using default port {port}.")
|
512
|
+
else:
|
513
|
+
logging.info(f"Username '{username}' doesn't match specific rules, using default port {port}.")
|
514
|
+
except Exception as e:
|
515
|
+
logging.error(f"Error determining port from username: {e}. Using default port {port}.", exc_info=True)
|
516
|
+
else:
|
517
|
+
logging.info(f"Not running on Windows, using default port {port}.")
|
518
|
+
# --- End of restored port calculation ---
|
519
|
+
|
520
|
+
logging.info(f"Final Host={host}, Port={port}")
|
504
521
|
|
505
522
|
try:
|
506
|
-
logging.info(f"Starting Uvicorn server on {
|
507
|
-
|
523
|
+
logging.info(f"Starting Uvicorn server on {host}:{port}")
|
524
|
+
# Use the calculated port and specific host
|
525
|
+
uvicorn.run(app, host=host, port=port)
|
508
526
|
logging.info("Uvicorn server stopped.")
|
509
527
|
except Exception as main_e:
|
510
528
|
logging.error("Error in main execution:", exc_info=True)
|
{computer_use_ootb_internal-0.0.117.dist-info → computer_use_ootb_internal-0.0.118.dist-info}/RECORD
RENAMED
@@ -1,6 +1,6 @@
|
|
1
1
|
computer_use_ootb_internal/README.md,sha256=FxpW95lyub2iX73ZDfK6ML7SdEKg060H5I6Grub7li4,31
|
2
2
|
computer_use_ootb_internal/__init__.py,sha256=Nqnn8clbgv-5l0PgxcTOldg8mkMKrFn4TvPL-rYUUGg,1
|
3
|
-
computer_use_ootb_internal/app_teachmode.py,sha256=
|
3
|
+
computer_use_ootb_internal/app_teachmode.py,sha256=PClMS7X6zRGzY7YPOV6Zxkfv5BajLVqmBiv-mOBVxkw,22164
|
4
4
|
computer_use_ootb_internal/app_teachmode_gradio.py,sha256=cmFpBrkdlZxOQADWveVdIaaNqaBD8IVs-xNLJogU7F8,7909
|
5
5
|
computer_use_ootb_internal/dependency_check.py,sha256=y8RMEP6RXQzTgU1MS_1piBLtz4J-Hfn9RjUZg59dyvo,1333
|
6
6
|
computer_use_ootb_internal/guard_service.py,sha256=z9GQdPJCd_Ds1xwCUn7hJBqPuto_FLhE1F5xqrvgh98,23496
|
@@ -34,7 +34,7 @@ computer_use_ootb_internal/computer_use_demo/tools/run.py,sha256=xhXdnBK1di9muaO
|
|
34
34
|
computer_use_ootb_internal/computer_use_demo/tools/screen_capture.py,sha256=L8qfvtUkPPQGt92N-2Zfw5ZTDBzLsDps39uMnX3_uSA,6857
|
35
35
|
computer_use_ootb_internal/preparation/__init__.py,sha256=AgtGHcBpiTkxJjF0xwcs3yyQ6SyUvhL3G0vD2XO-zJw,63
|
36
36
|
computer_use_ootb_internal/preparation/star_rail_prepare.py,sha256=s1VWszcTnJAKxqCHFlaOEwPkqVSrkiFx_yKpWSnSbHs,2649
|
37
|
-
computer_use_ootb_internal-0.0.
|
38
|
-
computer_use_ootb_internal-0.0.
|
39
|
-
computer_use_ootb_internal-0.0.
|
40
|
-
computer_use_ootb_internal-0.0.
|
37
|
+
computer_use_ootb_internal-0.0.118.dist-info/METADATA,sha256=hXxBaos02qZPHK7UQIFaRPJsCjTCmhZuL2Z7WMPRMA0,1048
|
38
|
+
computer_use_ootb_internal-0.0.118.dist-info/WHEEL,sha256=qtCwoSJWgHk21S1Kb4ihdzI2rlJ1ZKaIurTj_ngOhyQ,87
|
39
|
+
computer_use_ootb_internal-0.0.118.dist-info/entry_points.txt,sha256=bXfyAU_qq-G1EiEgAQEioXvgEdRCFxaTooqdDD9Y4OA,258
|
40
|
+
computer_use_ootb_internal-0.0.118.dist-info/RECORD,,
|
{computer_use_ootb_internal-0.0.117.dist-info → computer_use_ootb_internal-0.0.118.dist-info}/WHEEL
RENAMED
File without changes
|
File without changes
|