Spaces:
Running
Running
cli arg fix
Browse files- src/proxy_lite/cli.py +7 -3
src/proxy_lite/cli.py
CHANGED
@@ -15,6 +15,10 @@ def update_config_from_env(config: RunnerConfig) -> RunnerConfig:
|
|
15 |
config.solver.client.api_base = os.getenv("PROXY_LITE_API_BASE")
|
16 |
if os.getenv("PROXY_LITE_MODEL"):
|
17 |
config.solver.client.model_id = os.getenv("PROXY_LITE_MODEL")
|
|
|
|
|
|
|
|
|
18 |
return config
|
19 |
|
20 |
|
@@ -31,11 +35,11 @@ def do_command(args):
|
|
31 |
if args.model:
|
32 |
config.solver.client.model_id = args.model
|
33 |
if args.homepage:
|
34 |
-
config.homepage = args.homepage
|
35 |
if args.viewport_width:
|
36 |
-
config.viewport_width = args.viewport_width
|
37 |
if args.viewport_height:
|
38 |
-
config.viewport_height = args.viewport_height
|
39 |
o = Runner(config=config)
|
40 |
result = asyncio.run(o.run(do_text))
|
41 |
|
|
|
15 |
config.solver.client.api_base = os.getenv("PROXY_LITE_API_BASE")
|
16 |
if os.getenv("PROXY_LITE_MODEL"):
|
17 |
config.solver.client.model_id = os.getenv("PROXY_LITE_MODEL")
|
18 |
+
if os.getenv("PROXY_LITE_VIEWPORT_WIDTH"):
|
19 |
+
config.environment.viewport_width = int(os.getenv("PROXY_LITE_VIEWPORT_WIDTH"))
|
20 |
+
if os.getenv("PROXY_LITE_VIEWPORT_HEIGHT"):
|
21 |
+
config.environment.viewport_height = int(os.getenv("PROXY_LITE_VIEWPORT_HEIGHT"))
|
22 |
return config
|
23 |
|
24 |
|
|
|
35 |
if args.model:
|
36 |
config.solver.client.model_id = args.model
|
37 |
if args.homepage:
|
38 |
+
config.environment.homepage = args.homepage
|
39 |
if args.viewport_width:
|
40 |
+
config.environment.viewport_width = args.viewport_width
|
41 |
if args.viewport_height:
|
42 |
+
config.environment.viewport_height = args.viewport_height
|
43 |
o = Runner(config=config)
|
44 |
result = asyncio.run(o.run(do_text))
|
45 |
|