Skip to content

Commit

Permalink
Merge pull request #79 from minhoryang/chore/new-models
Browse files Browse the repository at this point in the history
[Chore] add new gpt models
  • Loading branch information
spikelu2016 authored Jul 8, 2024
2 parents 662db32 + a1a1765 commit fa136da
Show file tree
Hide file tree
Showing 2 changed files with 48 additions and 16 deletions.
26 changes: 26 additions & 0 deletions internal/manager/route.go
Original file line number Diff line number Diff line change
Expand Up @@ -96,6 +96,11 @@ func checkModelValidity(provider, model string) bool {

var (
azureSupportedModels = []string{
"gpt-4o-2024-05-13",
"gpt-4o",
"gpt-4-turbo-2024-04-09",
"gpt-4-0125-preview",
"gpt-4-vision-preview",
"gpt-4-1106-preview",
"gpt-4-1106-vision-preview",
"gpt-4",
Expand All @@ -108,6 +113,7 @@ var (
"gpt-4o-2024-05-13",
"gpt-4o",
"gpt-35-turbo",
"gpt-35-turbo-0125",
"gpt-35-turbo-1106",
"gpt-35-turbo-0301",
"gpt-35-turbo-instruct",
Expand All @@ -118,6 +124,11 @@ var (
}

openaiSupportedModels = []string{
"gpt-4o-2024-05-13",
"gpt-4o",
"gpt-4-turbo-2024-04-09",
"gpt-4-0125-preview",
"gpt-4-vision-preview",
"gpt-4-1106-preview",
"gpt-4-1106-vision-preview",
"gpt-4",
Expand All @@ -133,6 +144,7 @@ var (
"gpt-4o-2024-05-13",
"gpt-4o",
"gpt-3.5-turbo",
"gpt-3.5-turbo-0125",
"gpt-3.5-turbo-1106",
"gpt-3.5-turbo-0301",
"gpt-3.5-turbo-instruct",
Expand All @@ -143,6 +155,11 @@ var (
}

supportedModels = []string{
"gpt-4o-2024-05-13",
"gpt-4o",
"gpt-4-turbo-2024-04-09",
"gpt-4-0125-preview",
"gpt-4-vision-preview",
"gpt-4-1106-preview",
"gpt-4-1106-vision-preview",
"gpt-4",
Expand All @@ -158,13 +175,15 @@ var (
"gpt-4o-2024-05-13",
"gpt-4o",
"gpt-35-turbo",
"gpt-35-turbo-0125",
"gpt-35-turbo-1106",
"gpt-35-turbo-0301",
"gpt-35-turbo-instruct",
"gpt-35-turbo-0613",
"gpt-35-turbo-16k",
"gpt-35-turbo-16k-0613",
"gpt-3.5-turbo",
"gpt-3.5-turbo-0125",
"gpt-3.5-turbo-1106",
"gpt-3.5-turbo-0301",
"gpt-3.5-turbo-instruct",
Expand All @@ -184,12 +203,18 @@ var (

chatCompletionModels = []string{
"gpt-35-turbo",
"gpt-35-turbo-0125",
"gpt-35-turbo-1106",
"gpt-35-turbo-0301",
"gpt-35-turbo-instruct",
"gpt-35-turbo-0613",
"gpt-35-turbo-16k",
"gpt-35-turbo-16k-0613",
"gpt-4o-2024-05-13",
"gpt-4o",
"gpt-4-turbo-2024-04-09",
"gpt-4-0125-preview",
"gpt-4-vision-preview",
"gpt-4-1106-preview",
"gpt-4-1106-vision-preview",
"gpt-4",
Expand All @@ -205,6 +230,7 @@ var (
"gpt-4o-2024-05-13",
"gpt-4o",
"gpt-3.5-turbo",
"gpt-3.5-turbo-0125",
"gpt-3.5-turbo-1106",
"gpt-3.5-turbo-0301",
"gpt-3.5-turbo-instruct",
Expand Down
38 changes: 22 additions & 16 deletions internal/provider/azure/cost.go
Original file line number Diff line number Diff line change
Expand Up @@ -10,29 +10,35 @@ import (

var AzureOpenAiPerThousandTokenCost = map[string]map[string]float64{
"prompt": {
"gpt-4o": 0.005,
"gpt-4o-2024-05-13": 0.005,
"gpt-4": 0.03,
"gpt-4-32k": 0.06,
"gpt-4-vision": 0.06,
"gpt-35-turbo": 0.0015,
"gpt-35-turbo-instruct": 0.0015,
"gpt-35-turbo-16k": 0.003,
"gpt-4o": 0.005,
"gpt-4o-2024-05-13": 0.005,
"gpt-4-turbo": 0.01,
"gpt-4-turbo-2024-04-09": 0.01,
"gpt-4": 0.03,
"gpt-4-0125-preview": 0.03,
"gpt-4-32k": 0.06,
"gpt-4-vision": 0.06,
"gpt-35-turbo": 0.0015,
"gpt-35-turbo-instruct": 0.0015,
"gpt-35-turbo-16k": 0.003,
},
"embeddings": {
"ada": 0.0001,
"text-embedding-3-large": 0.00013,
"text-embedding-3-small": 0.00002,
},
"completion": {
"gpt-4o": 0.015,
"gpt-4o-2024-05-13": 0.015,
"gpt-4": 0.06,
"gpt-4-32k": 0.12,
"gpt-4-vision": 0.12,
"gpt-35-turbo": 0.002,
"gpt-35-turbo-instruct": 0.002,
"gpt-35-turbo-16k": 0.004,
"gpt-4o": 0.015,
"gpt-4o-2024-05-13": 0.015,
"gpt-4-turbo": 0.03,
"gpt-4-turbo-2024-04-09": 0.03,
"gpt-4": 0.06,
"gpt-4-0125-preview": 0.06,
"gpt-4-32k": 0.12,
"gpt-4-vision": 0.12,
"gpt-35-turbo": 0.002,
"gpt-35-turbo-instruct": 0.002,
"gpt-35-turbo-16k": 0.004,
},
}

Expand Down

0 comments on commit fa136da

Please sign in to comment.