diff --git a/core/dispatch.py b/core/dispatch.py index bb3dbb3..b73dff3 100644 --- a/core/dispatch.py +++ b/core/dispatch.py @@ -130,6 +130,11 @@ def dispatch_to_remote(remote_url, prompt, job_id=f"{get_client_id()}-unknown", "job_id": job_id, } } - ar = requests.post(f"{remote_url}/prompt", json=data, timeout=4) + ar = requests.post( + f"{remote_url}/prompt", + data = json.dumps(data), + headers = {"Content-Type": "application/json"}, + timeout = 4, + ) ar.raise_for_status() return diff --git a/requirements.txt b/requirements.txt new file mode 100644 index 0000000..70e33ba --- /dev/null +++ b/requirements.txt @@ -0,0 +1 @@ +requests>=2.28.2