Skip to content

Commit 32269da

Browse files
committed
chore: update default model to gpt-4-turbo
Update the default model to `gpt-4-turbo` (`gpt-4-turbo-2024-04-09`), which is newer than the present default `gpt-4-turbo-preview` (`gpt-4-0125-preview`). Signed-off-by: Nick Hale <[email protected]>
1 parent e15b721 commit 32269da

File tree

8 files changed

+14
-12
lines changed

8 files changed

+14
-12
lines changed

README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -118,7 +118,7 @@ OUTPUT:
118118
Hello, World!
119119
```
120120

121-
The model used by default is `gpt-4-turbo-preview` and you must have access to that model in your OpenAI account.
121+
The model used by default is `gpt-4-turbo` and you must have access to that model in your OpenAI account.
122122

123123
If using Azure OpenAI, make sure you configure the model to be one of the supported versions with the `--default-model` argument.
124124

@@ -244,7 +244,7 @@ Tool parameters are key-value pairs defined at the beginning of a tool block, be
244244
| Key | Description |
245245
|------------------|-----------------------------------------------------------------------------------------------------------------------------------------|
246246
| `Name` | The name of the tool. |
247-
| `Model Name` | The OpenAI model to use, by default it uses "gpt-4-turbo-preview" |
247+
| `Model Name` | The OpenAI model to use, by default it uses "gpt-4-turbo" |
248248
| `Description` | The description of the tool. It is important that this properly describes the tool's purpose as the description is used by the LLM. |
249249
| `Internal Prompt`| Setting this to `false` will disable the built-in system prompt for this tool. |
250250
| `Tools` | A comma-separated list of tools that are available to be called by this tool. |

docs/docs/02-getting-started.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,7 @@ OUTPUT:
5959
Hello, World!
6060
```
6161

62-
The model used by default is `gpt-4-turbo-preview` and you must have access to that model in your OpenAI account.
62+
The model used by default is `gpt-4-turbo` and you must have access to that model in your OpenAI account.
6363

6464
If using Azure OpenAI, make sure you configure the model to be one of the supported versions with the `--default-model` argument.
6565

docs/docs/07-gpt-file-reference.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@ Tool parameters are key-value pairs defined at the beginning of a tool block, be
4646
| Key | Description |
4747
|-------------------|-----------------------------------------------------------------------------------------------------------------------------------------------|
4848
| `Name` | The name of the tool. |
49-
| `Model Name` | The OpenAI model to use, by default it uses "gpt-4-turbo-preview" |
49+
| `Model Name` | The OpenAI model to use, by default it uses "gpt-4-turbo" |
5050
| `Description` | The description of the tool. It is important that this properly describes the tool's purpose as the description is used by the LLM. |
5151
| `Internal Prompt` | Setting this to `false` will disable the built-in system prompt for this tool. |
5252
| `Tools` | A comma-separated list of tools that are available to be called by this tool. |

go.mod

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -84,3 +84,5 @@ require (
8484
gotest.tools/v3 v3.5.1 // indirect
8585
mvdan.cc/gofumpt v0.6.0 // indirect
8686
)
87+
88+
replace github.com/gptscript-ai/chat-completion-client => github.com/njhale/chat-completion-client v0.0.0-20240430195304-47a4776457a1

go.sum

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -123,8 +123,6 @@ github.com/googleapis/gax-go/v2 v2.0.4/go.mod h1:0Wqv26UfaUD9n4G6kQubkQ+KchISgw+
123123
github.com/googleapis/gax-go/v2 v2.0.5/go.mod h1:DWXyrwAJ9X0FpwwEdw+IPEYBICEFu5mhpdKc/us6bOk=
124124
github.com/gorilla/websocket v1.5.0 h1:PPwGk2jz7EePpoHN/+ClbZu8SPxiqlu12wZP/3sWmnc=
125125
github.com/gorilla/websocket v1.5.0/go.mod h1:YR8l580nyteQvAITg2hZ9XVh4b55+EU/adAjf1fMHhE=
126-
github.com/gptscript-ai/chat-completion-client v0.0.0-20240404013040-49eb8f6affa1 h1:h0ikiEkB6lUgiOKN5ltZ7rzIvA13qjz8qcB/3wWdCws=
127-
github.com/gptscript-ai/chat-completion-client v0.0.0-20240404013040-49eb8f6affa1/go.mod h1:7P/o6/IWa1KqsntVf68hSnLKuu3+xuqm6lYhch1w4jo=
128126
github.com/hashicorp/errwrap v1.0.0 h1:hLrqtEDnRye3+sgx6z4qVLNuviH3MR5aQ0ykNJa/UYA=
129127
github.com/hashicorp/errwrap v1.0.0/go.mod h1:YH+1FKiLXxHSkmPseP+kNlulaMuP3n2brvKWEqk/Jc4=
130128
github.com/hashicorp/go-multierror v1.1.1 h1:H5DkEtf6CXdFp0N0Em5UCwQpXMWke8IA0+lD48awMYo=
@@ -195,6 +193,8 @@ github.com/mohae/deepcopy v0.0.0-20170929034955-c48cc78d4826 h1:RWengNIwukTxcDr9
195193
github.com/mohae/deepcopy v0.0.0-20170929034955-c48cc78d4826/go.mod h1:TaXosZuwdSHYgviHp1DAtfrULt5eUgsSMsZf+YrPgl8=
196194
github.com/nightlyone/lockfile v1.0.0 h1:RHep2cFKK4PonZJDdEl4GmkabuhbsRMgk/k3uAmxBiA=
197195
github.com/nightlyone/lockfile v1.0.0/go.mod h1:rywoIealpdNse2r832aiD9jRk8ErCatROs6LzC841CI=
196+
github.com/njhale/chat-completion-client v0.0.0-20240430195304-47a4776457a1 h1:WOaP2r03wUOf4F3c1u8MjzMvFeQBY14DhOnvv05eejE=
197+
github.com/njhale/chat-completion-client v0.0.0-20240430195304-47a4776457a1/go.mod h1:7P/o6/IWa1KqsntVf68hSnLKuu3+xuqm6lYhch1w4jo=
198198
github.com/nwaples/rardecode/v2 v2.0.0-beta.2 h1:e3mzJFJs4k83GXBEiTaQ5HgSc/kOK8q0rDaRO0MPaOk=
199199
github.com/nwaples/rardecode/v2 v2.0.0-beta.2/go.mod h1:yntwv/HfMc/Hbvtq9I19D1n58te3h6KsqCf3GxyfBGY=
200200
github.com/olahol/melody v1.1.4 h1:RQHfKZkQmDxI0+SLZRNBCn4LiXdqxLKRGSkT8Dyoe/E=

pkg/cli/gptscript.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -237,7 +237,7 @@ func (r *GPTScript) PersistentPre(*cobra.Command, []string) error {
237237
color.NoColor = !*r.Color
238238
}
239239

240-
if r.DefaultModel != "gpt-4-turbo-preview" {
240+
if r.DefaultModel != "gpt-4-turbo" {
241241
log.Infof("WARNING: Changing the default model can have unknown behavior for existing tools. Use the model field per tool instead.")
242242
}
243243

pkg/loader/loader_test.go

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ func TestHelloWorld(t *testing.T) {
2727
"entryToolId": "https://raw.githubusercontent.com/ibuildthecloud/test/bafe5a62174e8a0ea162277dcfe3a2ddb7eea928/example/sub/tool.gpt:1",
2828
"toolSet": {
2929
"https://raw.githubusercontent.com/ibuildthecloud/test/bafe5a62174e8a0ea162277dcfe3a2ddb7eea928/example/bob.gpt:1": {
30-
"modelName": "gpt-4-turbo-preview",
30+
"modelName": "gpt-4-turbo",
3131
"internalPrompt": null,
3232
"instructions": "Say hello world",
3333
"id": "https://raw.githubusercontent.com/ibuildthecloud/test/bafe5a62174e8a0ea162277dcfe3a2ddb7eea928/example/bob.gpt:1",
@@ -41,7 +41,7 @@ func TestHelloWorld(t *testing.T) {
4141
"workingDir": "https://raw.githubusercontent.com/ibuildthecloud/test/bafe5a62174e8a0ea162277dcfe3a2ddb7eea928/example"
4242
},
4343
"https://raw.githubusercontent.com/ibuildthecloud/test/bafe5a62174e8a0ea162277dcfe3a2ddb7eea928/example/sub/tool.gpt:1": {
44-
"modelName": "gpt-4-turbo-preview",
44+
"modelName": "gpt-4-turbo",
4545
"internalPrompt": null,
4646
"tools": [
4747
"../bob.gpt"
@@ -72,7 +72,7 @@ func TestHelloWorld(t *testing.T) {
7272
"toolSet": {
7373
"https://get.gptscript.ai/echo.gpt:1": {
7474
"description": "Returns back the input of the script",
75-
"modelName": "gpt-4-turbo-preview",
75+
"modelName": "gpt-4-turbo",
7676
"internalPrompt": null,
7777
"arguments": {
7878
"properties": {

pkg/openai/client.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ import (
2222
)
2323

2424
const (
25-
DefaultModel = openai.GPT4TurboPreview
25+
DefaultModel = openai.GPT4Turbo
2626
)
2727

2828
var (
@@ -47,7 +47,7 @@ type Options struct {
4747
APIVersion string `usage:"OpenAI API Version (for Azure)" name:"openai-api-version" env:"OPENAI_API_VERSION"`
4848
APIType openai.APIType `usage:"OpenAI API Type (valid: OPEN_AI, AZURE, AZURE_AD)" name:"openai-api-type" env:"OPENAI_API_TYPE"`
4949
OrgID string `usage:"OpenAI organization ID" name:"openai-org-id" env:"OPENAI_ORG_ID"`
50-
DefaultModel string `usage:"Default LLM model to use" default:"gpt-4-turbo-preview"`
50+
DefaultModel string `usage:"Default LLM model to use" default:"gpt-4-turbo"`
5151
ConfigFile string `usage:"Path to GPTScript config file" name:"config"`
5252
SetSeed bool `usage:"-"`
5353
CacheKey string `usage:"-"`

0 commit comments

Comments
 (0)