qa1145 commited on
Commit
ac390b8
·
verified ·
1 Parent(s): b53417f

Upload 9 files

Browse files
Files changed (1) hide show
  1. src/model_tester.py +3 -1
src/model_tester.py CHANGED
@@ -159,6 +159,7 @@ class ModelTester:
159
  try:
160
  timeout = aiohttp.ClientTimeout(total=config.get_request_timeout())
161
  async with session.post(url, json=payload, headers=headers, timeout=timeout) as response:
 
162
  if response.status == 200:
163
  data = await response.json()
164
  return {
@@ -168,10 +169,11 @@ class ModelTester:
168
  "method": "direct"
169
  }
170
  else:
 
171
  return {
172
  "success": False,
173
  "model": model_id,
174
- "error": f"HTTP {response.status}",
175
  "method": "direct"
176
  }
177
  except asyncio.TimeoutError:
 
159
  try:
160
  timeout = aiohttp.ClientTimeout(total=config.get_request_timeout())
161
  async with session.post(url, json=payload, headers=headers, timeout=timeout) as response:
162
+ body = await response.text()
163
  if response.status == 200:
164
  data = await response.json()
165
  return {
 
169
  "method": "direct"
170
  }
171
  else:
172
+ print(f"[try_model_direct] ERROR {model_id}: HTTP {response.status}, body: {body[:200]}")
173
  return {
174
  "success": False,
175
  "model": model_id,
176
+ "error": f"HTTP {response.status}: {body[:100]}",
177
  "method": "direct"
178
  }
179
  except asyncio.TimeoutError: