Spaces:
Running
Running
phyloforfun
commited on
Commit
•
94dfdfd
1
Parent(s):
b11bcf6
req
Browse files- api_cost/api_cost.yaml +5 -0
- bin/version.yml +2 -2
- requirements.txt +0 -0
- vouchervision/fetch_data.py +2 -2
- vouchervision/model_maps.py +9 -1
api_cost/api_cost.yaml
CHANGED
@@ -1,6 +1,8 @@
|
|
1 |
# OpenAI
|
2 |
# https://openai.com/pricing
|
3 |
|
|
|
|
|
4 |
GPT_4_32K:
|
5 |
in: 0.06
|
6 |
out: 0.12
|
@@ -13,6 +15,9 @@ GPT_4:
|
|
13 |
GPT_4o_2024_05_13:
|
14 |
in: 0.005
|
15 |
out: 0.015
|
|
|
|
|
|
|
16 |
GPT_4_TURBO_2024_04_09:
|
17 |
in: 0.01
|
18 |
out: 0.03
|
|
|
1 |
# OpenAI
|
2 |
# https://openai.com/pricing
|
3 |
|
4 |
+
|
5 |
+
# ALL COSTS REPORTED PER 1,000 TOKENS
|
6 |
GPT_4_32K:
|
7 |
in: 0.06
|
8 |
out: 0.12
|
|
|
15 |
GPT_4o_2024_05_13:
|
16 |
in: 0.005
|
17 |
out: 0.015
|
18 |
+
GPT_4o_mini_2024_07_18:
|
19 |
+
in: 0.000150
|
20 |
+
out: 0.000600
|
21 |
GPT_4_TURBO_2024_04_09:
|
22 |
in: 0.01
|
23 |
out: 0.03
|
bin/version.yml
CHANGED
@@ -1,2 +1,2 @@
|
|
1 |
-
last_update: '
|
2 |
-
version: v-2-
|
|
|
1 |
+
last_update: '2024-05-09'
|
2 |
+
version: v-2-2
|
requirements.txt
CHANGED
Binary files a/requirements.txt and b/requirements.txt differ
|
|
vouchervision/fetch_data.py
CHANGED
@@ -7,7 +7,7 @@ import urllib.request
|
|
7 |
from tqdm import tqdm
|
8 |
import subprocess
|
9 |
|
10 |
-
VERSION = 'v-2-
|
11 |
|
12 |
def fetch_data(logger, dir_home, cfg_file_path):
|
13 |
logger.name = 'Fetch Data'
|
@@ -102,7 +102,7 @@ def get_weights(dir_home, current, logger):
|
|
102 |
|
103 |
# Extract the contents of the ZIP file to the current directory
|
104 |
zipfilename = current + '.zip'
|
105 |
-
with ZipFile(zipfilename, 'r') as zip_file:
|
106 |
zip_file.extractall(os.path.join(dir_home,'bin'))
|
107 |
|
108 |
print(f"{bcolors.CGREENBG2}Data extracted to {path_zip}{bcolors.ENDC}")
|
|
|
7 |
from tqdm import tqdm
|
8 |
import subprocess
|
9 |
|
10 |
+
VERSION = 'v-2-2'
|
11 |
|
12 |
def fetch_data(logger, dir_home, cfg_file_path):
|
13 |
logger.name = 'Fetch Data'
|
|
|
102 |
|
103 |
# Extract the contents of the ZIP file to the current directory
|
104 |
zipfilename = current + '.zip'
|
105 |
+
with ZipFile(os.path.join(dir_home, zipfilename), 'r') as zip_file:
|
106 |
zip_file.extractall(os.path.join(dir_home,'bin'))
|
107 |
|
108 |
print(f"{bcolors.CGREENBG2}Data extracted to {path_zip}{bcolors.ENDC}")
|
vouchervision/model_maps.py
CHANGED
@@ -5,6 +5,7 @@ class ModelMaps:
|
|
5 |
'GPT_3_5': '#008000', # Green
|
6 |
'GPT_4_TURBO_2024_04_09': '#32CD32', # Lime Green
|
7 |
'GPT_4o_2024_05_13': '#3CB371', # Lime Green gpt-4o-2024-05-13
|
|
|
8 |
'GPT_3_5_INSTRUCT': '#3CB371', # Medium Sea Green
|
9 |
'GPT_4_TURBO_1106': '#228B22', # Forest Green
|
10 |
'GPT_4_TURBO_0125': '#228B22', # Forest Green
|
@@ -42,6 +43,7 @@ class ModelMaps:
|
|
42 |
MODELS_OPENAI = ["GPT 4",
|
43 |
"GPT 4 32k",
|
44 |
"GPT 4o 2024-05-13", #GPT_4o_2024_05_13
|
|
|
45 |
"GPT 4 Turbo 2024-04-09",#GPT_4_TURBO_2024_04_09
|
46 |
"GPT 4 Turbo 0125-preview",
|
47 |
"GPT 4 Turbo 1106-preview",
|
@@ -83,6 +85,7 @@ class ModelMaps:
|
|
83 |
'GPT 4 32k': 'GPT_4_32K',
|
84 |
'GPT 4': 'GPT_4',
|
85 |
"GPT 4o 2024-05-13": 'GPT_4o_2024_05_13',
|
|
|
86 |
"GPT 4 Turbo 2024-04-09": 'GPT_4_TURBO_2024_04_09',
|
87 |
'GPT 4 Turbo 0125-preview': 'GPT_4_TURBO_0125',
|
88 |
'GPT 4 Turbo 1106-preview': 'GPT_4_TURBO_1106',
|
@@ -127,6 +130,7 @@ class ModelMaps:
|
|
127 |
'GPT 4 Turbo 0125-preview': has_key_openai,
|
128 |
'GPT 4': has_key_openai,
|
129 |
"GPT 4o 2024-05-13": has_key_openai,
|
|
|
130 |
'GPT 4 32k': has_key_openai,
|
131 |
'GPT 3.5 Turbo': has_key_openai,
|
132 |
'GPT 3.5 Instruct': has_key_openai,
|
@@ -164,6 +168,7 @@ class ModelMaps:
|
|
164 |
def get_version_mapping_is_azure(cls, key):
|
165 |
version_mapping_is_azure = {
|
166 |
"GPT 4o 2024-05-13": False,
|
|
|
167 |
"GPT 4 Turbo 2024-04-09": False,
|
168 |
"GPT 4 Turbo 1106-preview": False,
|
169 |
"GPT 4 Turbo 0125-preview": False,
|
@@ -171,7 +176,7 @@ class ModelMaps:
|
|
171 |
'GPT 4 32k': False,
|
172 |
'GPT 3.5 Turbo': False,
|
173 |
'GPT 3.5 Instruct': False,
|
174 |
-
|
175 |
# 'Azure GPT 3.5 Turbo': True,
|
176 |
# 'Azure GPT 3.5 Instruct': True,
|
177 |
'Azure GPT 4': True,
|
@@ -220,6 +225,9 @@ class ModelMaps:
|
|
220 |
elif key == 'GPT_4o_2024_05_13':
|
221 |
return 'gpt-4o-2024-05-13'
|
222 |
|
|
|
|
|
|
|
223 |
elif key == 'GPT_4_TURBO_2024_04_09':
|
224 |
return 'gpt-4-turbo-2024-04-09'
|
225 |
|
|
|
5 |
'GPT_3_5': '#008000', # Green
|
6 |
'GPT_4_TURBO_2024_04_09': '#32CD32', # Lime Green
|
7 |
'GPT_4o_2024_05_13': '#3CB371', # Lime Green gpt-4o-2024-05-13
|
8 |
+
'GPT_4o_mini_2024_07_18': '#115730', # Lime Green gpt-4o-2024-05-13
|
9 |
'GPT_3_5_INSTRUCT': '#3CB371', # Medium Sea Green
|
10 |
'GPT_4_TURBO_1106': '#228B22', # Forest Green
|
11 |
'GPT_4_TURBO_0125': '#228B22', # Forest Green
|
|
|
43 |
MODELS_OPENAI = ["GPT 4",
|
44 |
"GPT 4 32k",
|
45 |
"GPT 4o 2024-05-13", #GPT_4o_2024_05_13
|
46 |
+
"GPT 4o mini 2024-07-18",
|
47 |
"GPT 4 Turbo 2024-04-09",#GPT_4_TURBO_2024_04_09
|
48 |
"GPT 4 Turbo 0125-preview",
|
49 |
"GPT 4 Turbo 1106-preview",
|
|
|
85 |
'GPT 4 32k': 'GPT_4_32K',
|
86 |
'GPT 4': 'GPT_4',
|
87 |
"GPT 4o 2024-05-13": 'GPT_4o_2024_05_13',
|
88 |
+
"GPT 4o mini 2024-07-18": 'GPT_4o_mini_2024_07_18',
|
89 |
"GPT 4 Turbo 2024-04-09": 'GPT_4_TURBO_2024_04_09',
|
90 |
'GPT 4 Turbo 0125-preview': 'GPT_4_TURBO_0125',
|
91 |
'GPT 4 Turbo 1106-preview': 'GPT_4_TURBO_1106',
|
|
|
130 |
'GPT 4 Turbo 0125-preview': has_key_openai,
|
131 |
'GPT 4': has_key_openai,
|
132 |
"GPT 4o 2024-05-13": has_key_openai,
|
133 |
+
"GPT 4o mini 2024-07-18": has_key_openai,
|
134 |
'GPT 4 32k': has_key_openai,
|
135 |
'GPT 3.5 Turbo': has_key_openai,
|
136 |
'GPT 3.5 Instruct': has_key_openai,
|
|
|
168 |
def get_version_mapping_is_azure(cls, key):
|
169 |
version_mapping_is_azure = {
|
170 |
"GPT 4o 2024-05-13": False,
|
171 |
+
"GPT 4o mini 2024-07-18": False,
|
172 |
"GPT 4 Turbo 2024-04-09": False,
|
173 |
"GPT 4 Turbo 1106-preview": False,
|
174 |
"GPT 4 Turbo 0125-preview": False,
|
|
|
176 |
'GPT 4 32k': False,
|
177 |
'GPT 3.5 Turbo': False,
|
178 |
'GPT 3.5 Instruct': False,
|
179 |
+
|
180 |
# 'Azure GPT 3.5 Turbo': True,
|
181 |
# 'Azure GPT 3.5 Instruct': True,
|
182 |
'Azure GPT 4': True,
|
|
|
225 |
elif key == 'GPT_4o_2024_05_13':
|
226 |
return 'gpt-4o-2024-05-13'
|
227 |
|
228 |
+
elif key == 'GPT_4o_mini_2024_07_18':
|
229 |
+
return 'gpt-4o-mini-2024-07-18'
|
230 |
+
|
231 |
elif key == 'GPT_4_TURBO_2024_04_09':
|
232 |
return 'gpt-4-turbo-2024-04-09'
|
233 |
|