Skip to content

Commit 4d6b741

Browse files
gustavocidornelaswhoseoyster
authored andcommitted
Update OpenAI model pricing
1 parent 94ff757 commit 4d6b741

File tree

2 files changed

+14
-22
lines changed

2 files changed

+14
-22
lines changed

openlayer/llm_monitors.py

Lines changed: 7 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -94,7 +94,7 @@ class OpenAIMonitor:
9494
9595
"""
9696

97-
# Last update: 2024-01-05
97+
# Last update: 2024-02-05
9898
COST_PER_TOKEN = {
9999
"babbage-002": {
100100
"input": 0.0004e-3,
@@ -104,9 +104,9 @@ class OpenAIMonitor:
104104
"input": 0.002e-3,
105105
"output": 0.002e-3,
106106
},
107-
"gpt-3.5-turbo": {
108-
"input": 0.003e-3,
109-
"output": 0.006e-3,
107+
"gpt-3.5-turbo-0125": {
108+
"input": 0.0005e-3,
109+
"output": 0.0015e-3,
110110
},
111111
"gpt-3.5-turbo-0301": {
112112
"input": 0.0015e-3,
@@ -132,9 +132,9 @@ class OpenAIMonitor:
132132
"input": 0.03e-3,
133133
"output": 0.06e-3,
134134
},
135-
"gpt-4-0314": {
136-
"input": 0.03e-3,
137-
"output": 0.06e-3,
135+
"gpt-4-0125-preview": {
136+
"input": 0.01e-3,
137+
"output": 0.03e-3,
138138
},
139139
"gpt-4-1106-preview": {
140140
"input": 0.01e-3,
@@ -148,10 +148,6 @@ class OpenAIMonitor:
148148
"input": 0.06e-3,
149149
"output": 0.12e-3,
150150
},
151-
"gpt-4-32k-0314": {
152-
"input": 0.06e-3,
153-
"output": 0.12e-3,
154-
},
155151
}
156152

157153
def __init__(

openlayer/model_runners/ll_model_runners.py

Lines changed: 7 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -442,7 +442,7 @@ def _get_cost_estimate(self, response: Dict[str, Any]) -> float:
442442
class OpenAIChatCompletionRunner(LLModelRunner):
443443
"""Wraps OpenAI's chat completion model."""
444444

445-
# Last update: 2024-01-05
445+
# Last update: 2024-02-05
446446
COST_PER_TOKEN = {
447447
"babbage-002": {
448448
"input": 0.0004e-3,
@@ -452,9 +452,9 @@ class OpenAIChatCompletionRunner(LLModelRunner):
452452
"input": 0.002e-3,
453453
"output": 0.002e-3,
454454
},
455-
"gpt-3.5-turbo": {
456-
"input": 0.003e-3,
457-
"output": 0.006e-3,
455+
"gpt-3.5-turbo-0125": {
456+
"input": 0.0005e-3,
457+
"output": 0.0015e-3,
458458
},
459459
"gpt-3.5-turbo-0301": {
460460
"input": 0.0015e-3,
@@ -480,9 +480,9 @@ class OpenAIChatCompletionRunner(LLModelRunner):
480480
"input": 0.03e-3,
481481
"output": 0.06e-3,
482482
},
483-
"gpt-4-0314": {
484-
"input": 0.03e-3,
485-
"output": 0.06e-3,
483+
"gpt-4-0125-preview": {
484+
"input": 0.01e-3,
485+
"output": 0.03e-3,
486486
},
487487
"gpt-4-1106-preview": {
488488
"input": 0.01e-3,
@@ -496,10 +496,6 @@ class OpenAIChatCompletionRunner(LLModelRunner):
496496
"input": 0.06e-3,
497497
"output": 0.12e-3,
498498
},
499-
"gpt-4-32k-0314": {
500-
"input": 0.06e-3,
501-
"output": 0.12e-3,
502-
},
503499
}
504500

505501
def __init__(

0 commit comments

Comments
 (0)