Tiny improve error message (#5526)

This commit is contained in:
fzyzcjy
2025-04-20 16:00:15 -07:00
committed by GitHub
parent 072b4d0398
commit fba86b6b54
@@ -324,7 +324,11 @@ class RuntimeEndpoint(BaseBackend):
def _assert_success(self, res):
if res.status_code != 200:
raise RuntimeError(res.json())
try:
content = res.json()
except json.JSONDecodeError:
content = res.text
raise RuntimeError(content)
def compute_normalized_prompt_logprobs(input_logprobs):