Skip to content

Commit

Permalink
Add GPT-4o-2024-08-06 model to spice/models.py with updated costs
Browse files Browse the repository at this point in the history
This commit adds the new GPT-4o-2024-08-06 model to the `spice/models.py` file. The new model supports Structured Outputs and has reduced costs compared to previous versions. Specifically, the input cost is reduced to 250 (from 500) and the output cost is reduced to 1000 (from 1500). Additionally, the model supports a maximum output of 16,384 tokens.

Changes made:
1. Added a new `TextModel` instance for GPT-4o-2024-08-06.
2. Updated the comment for the existing GPT-4o model to reflect that it currently points to gpt-4o-2024-05-13.
  • Loading branch information
mentatai[bot] committed Aug 10, 2024
1 parent 0f35da9 commit 3339341
Showing 1 changed file with 9 additions and 3 deletions.
12 changes: 9 additions & 3 deletions spice/models.py
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@ class UnknownModel(TextModel, EmbeddingModel, TranscriptionModel):


GPT_4o = TextModel("gpt-4o", OPEN_AI, input_cost=500, output_cost=1500, context_length=128000)
"""Warning: This model always points to OpenAI's latest GPT-4o model, so the input and output costs may incorrect. We recommend using specific versions of GPT-4o instead."""
"""Warning: This model always points to OpenAI's latest GPT-4o model (currently gpt-4o-2024-05-13), so the input and output costs may be incorrect. We recommend using specific versions of GPT-4o instead."""

GPT_4o_2024_05_13 = TextModel("gpt-4o-2024-05-13", OPEN_AI, input_cost=500, output_cost=1500, context_length=128000)

Expand All @@ -80,8 +80,14 @@ class UnknownModel(TextModel, EmbeddingModel, TranscriptionModel):
"gpt-4o-mini-2024-07-18", OPEN_AI, input_cost=15, output_cost=60, context_length=128000
)

GPT_4o_2024_05_13 = TextModel("gpt-4o-2024-05-13", OPEN_AI, input_cost=500, output_cost=1500, context_length=128000)

GPT_4o_2024_08_06 = TextModel(
"gpt-4o-2024-08-06",
OPEN_AI,
input_cost=250, # Reduced from 500
output_cost=1000, # Reduced from 1500
context_length=128000
)
# Note: This model supports a max output of 16,384 tokens, which is larger than previous versions.

GPT_4_TURBO = TextModel("gpt-4-turbo", OPEN_AI, input_cost=1000, output_cost=3000, context_length=128000)
"""Warning: This model always points to OpenAI's latest GPT-4-Turbo model, so the input and output costs may incorrect. We recommend using specific versions of GPT-4-Turbo instead."""
Expand Down

0 comments on commit 3339341

Please sign in to comment.