patch: minor bug fixes for evaluator and task configurations, documentation update (#121)

* fix: /cursor_position api return format fix

* chore: update README.md to remove deprecated command

* fix: add base score for evaluators and minor bug fixes

* fix: add base score for setup configurations

---------

Co-authored-by: Jiaqi Deng <jiaqideng@Jiaqis-MacBook-Pro.local>
This commit is contained in:
MillanK
2025-01-18 22:25:18 +08:00
committed by GitHub
parent 89426951c9
commit 983283a86a
13 changed files with 115 additions and 20 deletions

View File

@@ -57,6 +57,7 @@ def get_info_from_website(env, config: Dict[Any, Any]) -> Any:
port = env.chromium_port # fixme: this port is hard-coded, need to be changed from config file
server_port = env.server_port
remote_debugging_url = f"http://{host}:{port}"
backend_url = f"http://{host}:{server_port}"
with sync_playwright() as p:
# connect to remote Chrome instance
try:
@@ -69,7 +70,8 @@ def get_info_from_website(env, config: Dict[Any, Any]) -> Any:
"--remote-debugging-port=1337"
], "shell": False})
headers = {"Content-Type": "application/json"}
requests.post("http://" + host + ":" + server_port + "/setup" + "/launch", headers=headers, data=payload)
#requests.post("http://" + host + ":" + server_port + "/setup" + "/launch", headers=headers, data=payload)
requests.post(backend_url + "/setup" + "/launch", headers=headers, data=payload)
time.sleep(5)
browser = p.chromium.connect_over_cdp(remote_debugging_url)