Skip to content

Commit

Permalink
Update OpenAI models and prices #2261 (#2269)
Browse files Browse the repository at this point in the history
* Update OpenAI models

* Sort OpenAI models by created timestamp in ascending order

* Update OpenAI models price

* uncheck fallback listing (even if old)
closes #2261

* linting

---------

Co-authored-by: Yaner <[email protected]>
  • Loading branch information
timothycarambat and yaner-here authored Sep 11, 2024
1 parent c612239 commit 43b6ece
Showing 1 changed file with 15 additions and 7 deletions.
22 changes: 15 additions & 7 deletions server/utils/agents/aibitat/providers/openai.js
Original file line number Diff line number Diff line change
Expand Up @@ -9,10 +9,22 @@ const { RetryError } = require("../error.js");
class OpenAIProvider extends Provider {
model;
static COST_PER_TOKEN = {
"gpt-3.5-turbo": {
input: 0.0015,
output: 0.002,
},
"gpt-3.5-turbo-16k": {
input: 0.003,
output: 0.004,
},
"gpt-4": {
input: 0.03,
output: 0.06,
},
"gpt-4-turbo": {
input: 0.01,
output: 0.03,
},
"gpt-4o": {
input: 0.005,
output: 0.015,
Expand All @@ -21,13 +33,9 @@ class OpenAIProvider extends Provider {
input: 0.06,
output: 0.12,
},
"gpt-3.5-turbo": {
input: 0.0015,
output: 0.002,
},
"gpt-3.5-turbo-16k": {
input: 0.003,
output: 0.004,
"gpt-4o-mini": {
input: 0.00015,
output: 0.0006,
},
};

Expand Down

0 comments on commit 43b6ece

Please sign in to comment.