cxumol commited on
Commit
4d5cf91
1 Parent(s): 3e85eb9

debug: update logging

Browse files
Files changed (1) hide show
  1. app/util.py +4 -1
app/util.py CHANGED
@@ -41,7 +41,10 @@ def is_valid_openai_api_key(api_base: str, api_key: str) -> bool:
41
  test_url = f"{api_base}/models"
42
  response = requests.get(test_url, headers=headers)
43
  if response.status_code in range(200,300):
44
- ic(response.text())
 
 
 
45
  return response.status_code in range(200,300)
46
 
47
 
 
41
  test_url = f"{api_base}/models"
42
  response = requests.get(test_url, headers=headers)
43
  if response.status_code in range(200,300):
44
+ try:
45
+ ic(response.json())
46
+ except:
47
+ ic(response.text)
48
  return response.status_code in range(200,300)
49
 
50