sasaki-saku
commited on
Commit
•
f89df71
1
Parent(s):
09091e6
Update api_usage.py
Browse files- api_usage.py +1 -4
api_usage.py
CHANGED
@@ -135,9 +135,6 @@ def send_oai_completions(oai_stuff):
|
|
135 |
except Exception as e:
|
136 |
#print(e)
|
137 |
return "", "", ""
|
138 |
-
|
139 |
-
def helper_oai(oai_stuff):
|
140 |
-
return send_oai_completions(oai_stuff)
|
141 |
|
142 |
def format_status(list_models_avai, session, headers):
|
143 |
rpm = []
|
@@ -145,7 +142,7 @@ def format_status(list_models_avai, session, headers):
|
|
145 |
quota = ""
|
146 |
args = [(session, headers, model) for model in list_models_avai]
|
147 |
with concurrent.futures.ThreadPoolExecutor() as executer:
|
148 |
-
for result in executer.map(
|
149 |
rpm.append(result[0])
|
150 |
tpm.append(result[1])
|
151 |
if result[2]:
|
|
|
135 |
except Exception as e:
|
136 |
#print(e)
|
137 |
return "", "", ""
|
|
|
|
|
|
|
138 |
|
139 |
def format_status(list_models_avai, session, headers):
|
140 |
rpm = []
|
|
|
142 |
quota = ""
|
143 |
args = [(session, headers, model) for model in list_models_avai]
|
144 |
with concurrent.futures.ThreadPoolExecutor() as executer:
|
145 |
+
for result in executer.map(send_oai_completions, args):
|
146 |
rpm.append(result[0])
|
147 |
tpm.append(result[1])
|
148 |
if result[2]:
|