Fix NaN not allowed in newer requests versions

This commit is contained in:
City
2024-02-15 18:34:42 +01:00
parent 237ac34b0d
commit 64dd030ae3
2 changed files with 7 additions and 1 deletions
+6 -1
View File
@@ -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