Skip to content

Commit

Permalink
feat: support gpt-4o (merge pr #196 @XiaomaiTX)
Browse files Browse the repository at this point in the history
feat: support model `gpt-4o` and `gpt-4o-2024-05-13`
  • Loading branch information
zmh-program authored May 18, 2024
2 parents 78a3214 + b071374 commit a03fa7d
Show file tree
Hide file tree
Showing 4 changed files with 13 additions and 1 deletion.
2 changes: 2 additions & 0 deletions app/src/admin/channel.ts
Original file line number Diff line number Diff line change
Expand Up @@ -112,6 +112,8 @@ export const ChannelInfos: Record<string, ChannelInfo> = {
"gpt-4-32k",
"gpt-4-32k-0314",
"gpt-4-32k-0613",
"gpt-4o",
"gpt-4o-2024-05-13",
"dalle",
"dall-e-2",
"dall-e-3",
Expand Down
2 changes: 2 additions & 0 deletions app/src/admin/colors.ts
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,8 @@ export const modelColorMapper: Record<string, string> = {
"gpt-4-32k": "purple-600",
"gpt-4-32k-0613": "purple-600",
"gpt-4-32k-0314": "purple-600",
"gpt-4o": "purple-600",
"gpt-4o-2024-05-13": "purple-600",

"dall-e-3": "purple-700",

Expand Down
6 changes: 6 additions & 0 deletions app/src/admin/datasets/charge.ts
Original file line number Diff line number Diff line change
Expand Up @@ -66,6 +66,12 @@ export const pricing: PricingDataset = [
input: 0.01,
output: 0.03,
},
{
models: ["gpt-4o", "gpt-4o-2024-05-13"],
input: 0.005,
output: 0.015,
},

{
models: ["gpt-4-32k", "gpt-4-32k-0314", "gpt-4-32k-0613"],
input: 0.06,
Expand Down
4 changes: 3 additions & 1 deletion globals/variables.go
Original file line number Diff line number Diff line change
Expand Up @@ -90,6 +90,8 @@ const (
GPT432k = "gpt-4-32k"
GPT432k0314 = "gpt-4-32k-0314"
GPT432k0613 = "gpt-4-32k-0613"
GPT4O = "gpt-4o"
GPT4O20240513 = "gpt-4o-2024-05-13"
Dalle = "dalle"
Dalle2 = "dall-e-2"
Dalle3 = "dall-e-3"
Expand Down Expand Up @@ -138,7 +140,7 @@ var OpenAIDalleModels = []string{
}

var VisionModels = []string{
GPT4VisionPreview, GPT41106VisionPreview, // openai
GPT4VisionPreview, GPT41106VisionPreview, GPT4O, GPT4O20240513, // openai
GeminiProVision, // gemini
Claude3, // anthropic
ZhiPuChatGLM4Vision, // chatglm
Expand Down

0 comments on commit a03fa7d

Please sign in to comment.