Skip to content

Commit

Permalink
Added gpt-4o to model costs and model names (#671)
Browse files Browse the repository at this point in the history
Co-authored-by: rstaneker <[email protected]>
  • Loading branch information
st4r0 and rstaneker authored May 16, 2024
1 parent 28deb93 commit d2648f5
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 0 deletions.
1 change: 1 addition & 0 deletions instructor/_types/_alias.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
from typing_extensions import TypeAlias

ModelNames: TypeAlias = Literal[
"gpt-4o",
"gpt-4-0125-preview",
"gpt-4-turbo-preview",
"gpt-4-1106-preview",
Expand Down
1 change: 1 addition & 0 deletions instructor/cli/usage.py
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,7 @@ async def get_usage_for_past_n_days(n_days: int) -> list[dict[str, Any]]:

# Define the cost per unit for each model
MODEL_COSTS = {
"gpt-4o": {"prompt": 0.005 / 1000, "completion": 0.015 / 1000},
"gpt-4-0125-preview": {"prompt": 0.01 / 1000, "completion": 0.03 / 1000},
"gpt-4-turbo-preview": {"prompt": 0.01 / 1000, "completion": 0.03 / 1000},
"gpt-4-1106-preview": {"prompt": 0.01 / 1000, "completion": 0.03 / 1000},
Expand Down

0 comments on commit d2648f5

Please sign in to comment.