superdup95
commited on
Commit
•
91a1375
1
Parent(s):
3fa46ce
Update app.py
Browse files
app.py
CHANGED
@@ -4,10 +4,11 @@ import anthropic
|
|
4 |
from api_usage import get_subscription, check_key_availability, check_key_ant_availability
|
5 |
|
6 |
def sort_key(key):
|
7 |
-
|
8 |
-
|
|
|
9 |
else:
|
10 |
-
return get_key_oai_info(
|
11 |
|
12 |
def get_key_oai_info(key):
|
13 |
# Return a dictionary containing key information
|
|
|
4 |
from api_usage import get_subscription, check_key_availability, check_key_ant_availability
|
5 |
|
6 |
def sort_key(key):
|
7 |
+
_key = key.strip()
|
8 |
+
if _key.startswith("sk-ant-"):
|
9 |
+
return get_key_ant_info(_key)
|
10 |
else:
|
11 |
+
return get_key_oai_info(_key)
|
12 |
|
13 |
def get_key_oai_info(key):
|
14 |
# Return a dictionary containing key information
|