Skip to content

Commit

Permalink
openai: use gpt-4o by default
Browse files Browse the repository at this point in the history
faster, better and cheaper than gpt-4-turbo
  • Loading branch information
brainexe committed Jun 10, 2024
1 parent 757d506 commit cea4ce4
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 8 deletions.
1 change: 1 addition & 0 deletions command/export/export.go
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ import (
"github.com/slack-go/slack"
)

// limit the number of exported messages (incl thread messages)
const limit = 3000

// NewExportCommand is a constructor to create a new export command
Expand Down
2 changes: 1 addition & 1 deletion command/openai/config.go
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ func (c *Config) IsEnabled() bool {

var defaultConfig = Config{
APIHost: apiHost,
Model: "gpt-3.5-turbo", // aka model behind ChatGPT
Model: "gpt-4o", // aka model behind ChatGPT
UpdateInterval: time.Second * 1,
HistorySize: 25,
InitialSystemMessage: "You are a helpful Slack bot. By default, keep your answer short and truthful",
Expand Down
14 changes: 7 additions & 7 deletions command/openai/tokens.go
Original file line number Diff line number Diff line change
Expand Up @@ -7,13 +7,13 @@ import (
// https://platform.openai.com/docs/models/gpt-3-5
// https://platform.openai.com/docs/models/gpt-4
var maxTokens = map[string]int{
"gpt-4": 8192,
"gpt-4-32k": 32768,
"gpt-4-1106-preview": 128000,
"gpt-4-vision-preview": 128000,
"gpt-3.5-turbo-16k": 16385,
"gpt-3.5-turbo": 4096,
"dummy-test": 100, // just for testing
"gpt-4": 8192,
"gpt-4-32k": 32768,
"gpt-4-1106-preview": 128000,
"gpt-4-turbo": 128000,
"gpt-4o": 128000,
"gpt-3.5-turbo": 16385,
"dummy-test": 100, // just for testing
}

var modelDateRe = regexp.MustCompile(`-\d{4}`)
Expand Down

0 comments on commit cea4ce4

Please sign in to comment.