Spaces:
Running
Running
cxumol
commited on
debug: update logging
Browse files- 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 |
-
|
|
|
|
|
|
|
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 |
|