Skip to content

Commit 65444a8

Browse files
Merge pull request #201 from ibuildthecloud/model-provider
chore: add warning about setting the default-model
2 parents 96a8368 + 4726f00 commit 65444a8

File tree

4 files changed

+12
-3
lines changed

4 files changed

+12
-3
lines changed

go.mod

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ module github.com/gptscript-ai/gptscript
22

33
go 1.22.0
44

5-
replace github.com/sashabaranov/go-openai => github.com/gptscript-ai/go-openai v0.0.0-20240328093028-7993661f9eab
5+
replace github.com/sashabaranov/go-openai => github.com/gptscript-ai/go-openai v0.0.0-20240329145331-9325362ed457
66

77
require (
88
github.com/AlecAivazis/survey/v2 v2.3.7

go.sum

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -116,8 +116,8 @@ github.com/googleapis/gax-go/v2 v2.0.4/go.mod h1:0Wqv26UfaUD9n4G6kQubkQ+KchISgw+
116116
github.com/googleapis/gax-go/v2 v2.0.5/go.mod h1:DWXyrwAJ9X0FpwwEdw+IPEYBICEFu5mhpdKc/us6bOk=
117117
github.com/gorilla/websocket v1.5.0 h1:PPwGk2jz7EePpoHN/+ClbZu8SPxiqlu12wZP/3sWmnc=
118118
github.com/gorilla/websocket v1.5.0/go.mod h1:YR8l580nyteQvAITg2hZ9XVh4b55+EU/adAjf1fMHhE=
119-
github.com/gptscript-ai/go-openai v0.0.0-20240328093028-7993661f9eab h1:uZP7zZqtQI5lfK0fGBmi2ZUrI973tNCnCDx326LG00k=
120-
github.com/gptscript-ai/go-openai v0.0.0-20240328093028-7993661f9eab/go.mod h1:lj5b/K+zjTSFxVLijLSTDZuP7adOgerWeFyZLUhAKRg=
119+
github.com/gptscript-ai/go-openai v0.0.0-20240329145331-9325362ed457 h1:ziAtY3K9pxk4Ua/0dQdndAopXyLlzguX9ECRbi8E9t4=
120+
github.com/gptscript-ai/go-openai v0.0.0-20240329145331-9325362ed457/go.mod h1:lj5b/K+zjTSFxVLijLSTDZuP7adOgerWeFyZLUhAKRg=
121121
github.com/hashicorp/errwrap v1.0.0 h1:hLrqtEDnRye3+sgx6z4qVLNuviH3MR5aQ0ykNJa/UYA=
122122
github.com/hashicorp/errwrap v1.0.0/go.mod h1:YH+1FKiLXxHSkmPseP+kNlulaMuP3n2brvKWEqk/Jc4=
123123
github.com/hashicorp/go-multierror v1.1.1 h1:H5DkEtf6CXdFp0N0Em5UCwQpXMWke8IA0+lD48awMYo=

pkg/cli/gptscript.go

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -119,6 +119,10 @@ func (r *GPTScript) Run(cmd *cobra.Command, args []string) error {
119119
color.NoColor = !*r.Color
120120
}
121121

122+
if r.DefaultModel != "" {
123+
log.Infof("WARNING: Changing the default model can have unknown behavior for existing tools. Use the model field per tool instead.")
124+
}
125+
122126
gptOpt := gptscript.Options{
123127
Cache: cache.Options(r.CacheOptions),
124128
OpenAI: openai.Options(r.OpenAIOptions),

pkg/cli/log.go

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
package cli
2+
3+
import "github.com/gptscript-ai/gptscript/pkg/mvl"
4+
5+
var log = mvl.Package()

0 commit comments

Comments
 (0)