Skip to content

Commit

Permalink
feat: add init type for cli (#979)
Browse files Browse the repository at this point in the history
# Description

The `yomo init` command adds a `type` flag to create different types of
stream function.

```
yomo init -h
Initialize a YoMo Stream function

Usage:
  yomo init <app_name> [flags]

Flags:
  -h, --help          help for init
  -l, --lang string   The language of Stream Function, support go and node (default "go")
  -t, --type string   The type of Stream Function, support normal and llm (default "llm")
```

---------

Co-authored-by: woorui <[email protected]>
  • Loading branch information
venjiang and woorui authored Feb 24, 2025
1 parent 9ed4c2e commit 344800c
Show file tree
Hide file tree
Showing 31 changed files with 107 additions and 97 deletions.
6 changes: 3 additions & 3 deletions cli/build.go
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ var buildCmd = &cobra.Command{
Long: "Build the YoMo Stream Function",
Run: func(cmd *cobra.Command, args []string) {
if err := parseFileArg(args, &opts, defaultSFNSourceFile); err != nil {
log.FailureStatusEvent(os.Stdout, err.Error())
log.FailureStatusEvent(os.Stdout, "%s", err.Error())
os.Exit(127)
// return
}
Expand All @@ -41,15 +41,15 @@ var buildCmd = &cobra.Command{
log.InfoStatusEvent(os.Stdout, "YoMo Stream Function parsing...")
s, err := serverless.Create(&opts)
if err != nil {
log.FailureStatusEvent(os.Stdout, err.Error())
log.FailureStatusEvent(os.Stdout, "%s", err.Error())
os.Exit(127)
// return
}
log.InfoStatusEvent(os.Stdout, "YoMo Stream Function parse done.")
// build
log.PendingStatusEvent(os.Stdout, "Building YoMo Stream Function instance...")
if err := s.Build(true); err != nil {
log.FailureStatusEvent(os.Stdout, err.Error())
log.FailureStatusEvent(os.Stdout, "%s", err.Error())
os.Exit(127)
// return
}
Expand Down
8 changes: 4 additions & 4 deletions cli/dev.go
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ var devCmd = &cobra.Command{
FParseErrWhitelist: cobra.FParseErrWhitelist{UnknownFlags: true},
Run: func(cmd *cobra.Command, args []string) {
if err := parseFileArg(args, &opts, defaultSFNCompliedFile, defaultSFNWASIFile, defaultSFNSourceFile); err != nil {
log.FailureStatusEvent(os.Stdout, err.Error())
log.FailureStatusEvent(os.Stdout, "%s", err.Error())
return
}
loadOptionsFromViper(viper.RunViper, &opts)
Expand All @@ -52,7 +52,7 @@ var devCmd = &cobra.Command{

s, err := serverless.Create(&opts)
if err != nil {
log.FailureStatusEvent(os.Stdout, err.Error())
log.FailureStatusEvent(os.Stdout, "%s", err.Error())
return
}
if !s.Executable() {
Expand All @@ -68,7 +68,7 @@ var devCmd = &cobra.Command{
if ext := filepath.Ext(opts.Filename); ext == ".go" {
log.PendingStatusEvent(os.Stdout, "Building YoMo Stream Function instance...")
if err := s.Build(true); err != nil {
log.FailureStatusEvent(os.Stdout, err.Error())
log.FailureStatusEvent(os.Stdout, "%s", err.Error())
os.Exit(127)
}
log.SuccessStatusEvent(os.Stdout, "YoMo Stream Function build successful!")
Expand All @@ -81,7 +81,7 @@ var devCmd = &cobra.Command{
)
log.InfoStatusEvent(os.Stdout, "Stream Function is running...")
if err := s.Run(verbose); err != nil {
log.FailureStatusEvent(os.Stdout, err.Error())
log.FailureStatusEvent(os.Stdout, "%s", err.Error())
return
}
},
Expand Down
36 changes: 20 additions & 16 deletions cli/init.go
Original file line number Diff line number Diff line change
Expand Up @@ -29,39 +29,43 @@ import (
"github.com/yomorun/yomo/pkg/log"
)

var lang string
var (
sfnType string
lang string
)

// initCmd represents the init command
var initCmd = &cobra.Command{
Use: "init",
Use: "init <app_name>",
Short: "Initialize a YoMo Stream function",
Long: "Initialize a YoMo Stream function",
Run: func(cmd *cobra.Command, args []string) {
name := opts.Name
name := ""
if len(args) >= 1 && args[0] != "" {
name = args[0]
opts.Name = name
}

if name == "" {
log.FailureStatusEvent(os.Stdout, "Please input your app name")
log.FailureStatusEvent(os.Stdout, "Please input your app name, e.g. `yomo init my-app [-l go -t llm]`")
return
}

log.PendingStatusEvent(os.Stdout, "Initializing the Stream Function...")
name = strings.ReplaceAll(name, " ", "_")

filename := filepath.Join(name, DefaultSFNSourceFile(lang))
opts.Filename = filename
// serverless setup
err := serverless.Setup(&opts)

// create app source file
fname := filepath.Join(name, DefaultSFNSourceFile(lang))
contentTmpl, err := template.GetContent("init", sfnType, lang, false)
if err != nil {
log.FailureStatusEvent(os.Stdout, err.Error())
log.FailureStatusEvent(os.Stdout, "%s", err.Error())
return
}
// create app source file
fname := filepath.Join(name, DefaultSFNSourceFile(lang))
contentTmpl, err := template.GetContent("init", "", lang, false)
// serverless setup
err = serverless.Setup(&opts)
if err != nil {
log.FailureStatusEvent(os.Stdout, err.Error())
log.FailureStatusEvent(os.Stdout, "%s", err.Error())
return
}
if err := file.PutContents(fname, contentTmpl); err != nil {
Expand All @@ -70,10 +74,10 @@ var initCmd = &cobra.Command{
}
// create app test file
testName := filepath.Join(name, DefaultSFNTestSourceFile(lang))
testTmpl, err := template.GetContent("init", "", lang, true)
testTmpl, err := template.GetContent("init", sfnType, lang, true)
if err != nil {
if !errors.Is(err, template.ErrUnsupportedTest) {
log.FailureStatusEvent(os.Stdout, err.Error())
log.FailureStatusEvent(os.Stdout, "%s", err.Error())
return
}
} else {
Expand All @@ -98,6 +102,6 @@ var initCmd = &cobra.Command{
func init() {
rootCmd.AddCommand(initCmd)

initCmd.Flags().StringVarP(&opts.Name, "name", "n", "", "The name of Stream Function")
initCmd.Flags().StringVarP(&sfnType, "type", "t", "llm", "The type of Stream Function, support normal and llm")
initCmd.Flags().StringVarP(&lang, "lang", "l", "go", "The language of Stream Function, support go and node")
}
1 change: 0 additions & 1 deletion cli/root.go
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,6 @@ var rootCmd = &cobra.Command{
Use: "yomo",
Version: GetVersion(),
PersistentPreRun: func(cmd *cobra.Command, args []string) {},
// Run: func(cmd *cobra.Command, args []string) { },
}

// Execute adds all child commands to the root command and sets flags appropriately.
Expand Down
10 changes: 5 additions & 5 deletions cli/run.go
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ var runCmd = &cobra.Command{
Long: "Run a YoMo Stream Function",
Run: func(cmd *cobra.Command, args []string) {
if err := parseFileArg(args, &opts, defaultSFNCompliedFile, defaultSFNWASIFile, defaultSFNSourceFile, defaultSFNSourceTSFile); err != nil {
log.FailureStatusEvent(os.Stdout, err.Error())
log.FailureStatusEvent(os.Stdout, "%s", err.Error())
return
}
loadOptionsFromViper(viper.RunViper, &opts)
Expand All @@ -50,12 +50,12 @@ var runCmd = &cobra.Command{
// resolve serverless
log.PendingStatusEvent(os.Stdout, "Creating YoMo Stream Function instance...")
if err := parseZipperAddr(&opts); err != nil {
log.FailureStatusEvent(os.Stdout, err.Error())
log.FailureStatusEvent(os.Stdout, "%s", err.Error())
return
}
s, err := serverless.Create(&opts)
if err != nil {
log.FailureStatusEvent(os.Stdout, err.Error())
log.FailureStatusEvent(os.Stdout, "%s", err.Error())
return
}
if !s.Executable() {
Expand All @@ -69,7 +69,7 @@ var runCmd = &cobra.Command{
}

if err := s.Build(true); err != nil {
log.FailureStatusEvent(os.Stdout, err.Error())
log.FailureStatusEvent(os.Stdout, "%s", err.Error())
os.Exit(127)
}

Expand All @@ -80,7 +80,7 @@ var runCmd = &cobra.Command{
)
log.InfoStatusEvent(os.Stdout, "Stream Function is running...")
if err := s.Run(verbose); err != nil {
log.FailureStatusEvent(os.Stdout, err.Error())
log.FailureStatusEvent(os.Stdout, "%s", err.Error())
return
}
},
Expand Down
12 changes: 6 additions & 6 deletions cli/serve.go
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ var serveCmd = &cobra.Command{
// config
conf, err := pkgconfig.ParseConfigFile(config)
if err != nil {
log.FailureStatusEvent(os.Stdout, err.Error())
log.FailureStatusEvent(os.Stdout, "%s", err.Error())
return
}

Expand All @@ -87,9 +87,9 @@ var serveCmd = &cobra.Command{
aiConfig, err := ai.ParseConfig(bridgeConf)
if err != nil {
if err == ai.ErrConfigNotFound {
log.InfoStatusEvent(os.Stdout, err.Error())
log.InfoStatusEvent(os.Stdout, "%s", err.Error())
} else {
log.FailureStatusEvent(os.Stdout, err.Error())
log.FailureStatusEvent(os.Stdout, "%s", err.Error())
return
}
}
Expand All @@ -105,7 +105,7 @@ var serveCmd = &cobra.Command{
conf.Mesh,
options...)
if err != nil {
log.FailureStatusEvent(os.Stdout, err.Error())
log.FailureStatusEvent(os.Stdout, "%s", err.Error())
return
}
zipper.Logger().Info("using config file", "file_path", config)
Expand All @@ -124,7 +124,7 @@ var serveCmd = &cobra.Command{

err := ai.Serve(aiConfig, ylog.Default(), source, reducer)
if err != nil {
log.FailureStatusEvent(os.Stdout, err.Error())
log.FailureStatusEvent(os.Stdout, "%s", err.Error())
return
}
}()
Expand All @@ -133,7 +133,7 @@ var serveCmd = &cobra.Command{
// start the zipper
err = zipper.ListenAndServe(ctx, listenAddr)
if err != nil {
log.FailureStatusEvent(os.Stdout, err.Error())
log.FailureStatusEvent(os.Stdout, "%s", err.Error())
return
}
},
Expand Down
3 changes: 3 additions & 0 deletions cli/serverless/nodejs/runtime.go
Original file line number Diff line number Diff line change
Expand Up @@ -228,6 +228,9 @@ func (w *NodejsWrapper) InstallDeps() error {
}
// devDependencies
cmd = exec.Command(w.npmPath, "install", "-D", "@types/node", "ts-node")
cmd.Dir = w.workDir
cmd.Stderr = os.Stderr
cmd.Env = os.Environ()
err = cmd.Run()
if err != nil {
return fmt.Errorf("run %s failed: %v", cmd.String(), err)
Expand Down
4 changes: 4 additions & 0 deletions cli/template/template.go
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,10 @@ func getTemplateFileName(command string, sfnType string, lang string, isTest boo
if err != nil {
return "", err
}
if lang == "node" && sfnType == "normal" {
return "", errors.New("language node (-l node) only support type llm (-t llm)")
}

sb := new(strings.Builder)
sb.WriteString(lang)
sb.WriteString("/")
Expand Down
4 changes: 2 additions & 2 deletions cli/template/template_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -36,8 +36,8 @@ func TestGetTemplateFileName(t *testing.T) {
lang: "node",
isTest: true,
},
want: "node/init_normal_test.tmpl",
wantErr: false,
want: "",
wantErr: true,
},
{
name: "default_command_llm_go",
Expand Down
6 changes: 3 additions & 3 deletions example/1-pipeline/go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -27,9 +27,9 @@ require (
github.com/mattn/go-colorable v0.1.14 // indirect
github.com/mattn/go-isatty v0.0.20 // indirect
github.com/onsi/ginkgo/v2 v2.22.2 // indirect
github.com/quic-go/quic-go v0.48.2 // indirect
github.com/quic-go/quic-go v0.49.0 // indirect
github.com/robfig/cron/v3 v3.0.1 // indirect
github.com/sashabaranov/go-openai v1.36.1 // indirect
github.com/sashabaranov/go-openai v1.37.0 // indirect
github.com/vmihailenco/msgpack/v5 v5.4.1 // indirect
github.com/vmihailenco/tagparser/v2 v2.0.0 // indirect
github.com/wk8/go-ordered-map/v2 v2.1.8 // indirect
Expand All @@ -45,7 +45,7 @@ require (
go.uber.org/mock v0.5.0 // indirect
golang.org/x/crypto v0.32.0 // indirect
golang.org/x/exp v0.0.0-20250128182459-e0ece0dbea4c // indirect
golang.org/x/mod v0.22.0 // indirect
golang.org/x/mod v0.23.0 // indirect
golang.org/x/net v0.34.0 // indirect
golang.org/x/sync v0.10.0 // indirect
golang.org/x/sys v0.29.0 // indirect
Expand Down
12 changes: 6 additions & 6 deletions example/1-pipeline/go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -118,15 +118,15 @@ github.com/prometheus/client_golang v0.8.0/go.mod h1:7SWBe2y4D6OKWSNQJUaRYU/AaXP
github.com/prometheus/client_model v0.0.0-20180712105110-5c3871d89910/go.mod h1:MbSGuTsp3dbXC40dX6PRTWyKYBIrTGTE9sqQNg2J8bo=
github.com/prometheus/common v0.0.0-20180801064454-c7de2306084e/go.mod h1:daVV7qP5qjZbuso7PdcryaAu0sAZbrN9i7WWcTMWvro=
github.com/prometheus/procfs v0.0.0-20180725123919-05ee40e3a273/go.mod h1:c3At6R/oaqEKCNdg8wHV1ftS6bRYblBhIjjI8uT2IGk=
github.com/quic-go/quic-go v0.48.2 h1:wsKXZPeGWpMpCGSWqOcqpW2wZYic/8T3aqiOID0/KWE=
github.com/quic-go/quic-go v0.48.2/go.mod h1:yBgs3rWBOADpga7F+jJsb6Ybg1LSYiQvwWlLX+/6HMs=
github.com/quic-go/quic-go v0.49.0 h1:w5iJHXwHxs1QxyBv1EHKuC50GX5to8mJAxvtnttJp94=
github.com/quic-go/quic-go v0.49.0/go.mod h1:s2wDnmCdooUQBmQfpUSTCYBl1/D4FcqbULMMkASvR6s=
github.com/robfig/cron/v3 v3.0.1 h1:WdRxkvbJztn8LMz/QEvLN5sBU+xKpSqwwUO1Pjr4qDs=
github.com/robfig/cron/v3 v3.0.1/go.mod h1:eQICP3HwyT7UooqI/z+Ov+PtYAWygg1TEWWzGIFLtro=
github.com/rogpeppe/go-internal v1.13.1 h1:KvO1DLK/DRN07sQ1LQKScxyZJuNnedQ5/wKSR38lUII=
github.com/rogpeppe/go-internal v1.13.1/go.mod h1:uMEvuHeurkdAXX61udpOXGD/AzZDWNMNyH2VO9fmH0o=
github.com/russross/blackfriday v1.5.2/go.mod h1:JO/DiYxRf+HjHt06OyowR9PTA263kcR/rfWxYHBV53g=
github.com/sashabaranov/go-openai v1.36.1 h1:EVfRXwIlW2rUzpx6vR+aeIKCK/xylSrVYAx1TMTSX3g=
github.com/sashabaranov/go-openai v1.36.1/go.mod h1:lj5b/K+zjTSFxVLijLSTDZuP7adOgerWeFyZLUhAKRg=
github.com/sashabaranov/go-openai v1.37.0 h1:hQQowgYm4OXJ1Z/wTrE+XZaO20BYsL0R3uRPSpfNZkY=
github.com/sashabaranov/go-openai v1.37.0/go.mod h1:lj5b/K+zjTSFxVLijLSTDZuP7adOgerWeFyZLUhAKRg=
github.com/sergi/go-diff v1.0.0/go.mod h1:0CfEIISq7TuYL3j771MWULgwwjU+GofnZX9QAmXWZgo=
github.com/shurcooL/component v0.0.0-20170202220835-f88ec8f54cc4/go.mod h1:XhFIlyj5a1fBNx5aJTbKoIq0mNaPvOagO+HjB3EtxrY=
github.com/shurcooL/events v0.0.0-20181021180414-410e4ca65f48/go.mod h1:5u70Mqkb5O5cxEA8nxTsgrgLehJeAw6Oc4Ab1c/P1HM=
Expand Down Expand Up @@ -202,8 +202,8 @@ golang.org/x/exp v0.0.0-20250128182459-e0ece0dbea4c/go.mod h1:tujkw807nyEEAamNbD
golang.org/x/lint v0.0.0-20180702182130-06c8688daad7/go.mod h1:UVdnD1Gm6xHRNCYTkRU2/jEulfH38KcIWyp/GAMgvoE=
golang.org/x/lint v0.0.0-20181026193005-c67002cb31c3/go.mod h1:UVdnD1Gm6xHRNCYTkRU2/jEulfH38KcIWyp/GAMgvoE=
golang.org/x/lint v0.0.0-20190227174305-5b3e6a55c961/go.mod h1:wehouNa3lNwaWXcvxsM5YxQ5yQlVC4a0KAMCusXpPoU=
golang.org/x/mod v0.22.0 h1:D4nJWe9zXqHOmWqj4VMOJhvzj7bEZg4wEYa759z1pH4=
golang.org/x/mod v0.22.0/go.mod h1:6SkKJ3Xj0I0BrPOZoBy3bdMptDDU9oJrpohJ3eWZ1fY=
golang.org/x/mod v0.23.0 h1:Zb7khfcRGKk+kqfxFaP5tZqCnDZMjC5VtUBs87Hr6QM=
golang.org/x/mod v0.23.0/go.mod h1:6SkKJ3Xj0I0BrPOZoBy3bdMptDDU9oJrpohJ3eWZ1fY=
golang.org/x/net v0.0.0-20180724234803-3673e40ba225/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4=
golang.org/x/net v0.0.0-20180826012351-8a410e7b638d/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4=
golang.org/x/net v0.0.0-20180906233101-161cd47e91fd/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4=
Expand Down
2 changes: 1 addition & 1 deletion example/10-ai/llm-sfn-currency-converter/go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ require (
github.com/davecgh/go-spew v1.1.2-0.20180830191138-d8f796af33cc // indirect
github.com/lmittmann/tint v1.0.7 // indirect
github.com/pmezard/go-difflib v1.0.1-0.20181226105442-5d4384ee4fb2 // indirect
github.com/sashabaranov/go-openai v1.36.1 // indirect
github.com/sashabaranov/go-openai v1.37.0 // indirect
gopkg.in/natefinch/lumberjack.v2 v2.2.1 // indirect
gopkg.in/yaml.v3 v3.0.1 // indirect
)
4 changes: 2 additions & 2 deletions example/10-ai/llm-sfn-currency-converter/go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,8 @@ github.com/lmittmann/tint v1.0.7 h1:D/0OqWZ0YOGZ6AyC+5Y2kD8PBEzBk6rFHVSfOqCkF9Y=
github.com/lmittmann/tint v1.0.7/go.mod h1:HIS3gSy7qNwGCj+5oRjAutErFBl4BzdQP6cJZ0NfMwE=
github.com/pmezard/go-difflib v1.0.1-0.20181226105442-5d4384ee4fb2 h1:Jamvg5psRIccs7FGNTlIRMkT8wgtp5eCXdBlqhYGL6U=
github.com/pmezard/go-difflib v1.0.1-0.20181226105442-5d4384ee4fb2/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4=
github.com/sashabaranov/go-openai v1.36.1 h1:EVfRXwIlW2rUzpx6vR+aeIKCK/xylSrVYAx1TMTSX3g=
github.com/sashabaranov/go-openai v1.36.1/go.mod h1:lj5b/K+zjTSFxVLijLSTDZuP7adOgerWeFyZLUhAKRg=
github.com/sashabaranov/go-openai v1.37.0 h1:hQQowgYm4OXJ1Z/wTrE+XZaO20BYsL0R3uRPSpfNZkY=
github.com/sashabaranov/go-openai v1.37.0/go.mod h1:lj5b/K+zjTSFxVLijLSTDZuP7adOgerWeFyZLUhAKRg=
github.com/stretchr/testify v1.10.0 h1:Xv5erBjTwe/5IxqUQTdXv5kgmIvbHo3QQyRwhJsOfJA=
github.com/stretchr/testify v1.10.0/go.mod h1:r2ic/lqez/lEtzL7wO/rwa5dbSLXVDPFyf8C91i36aY=
gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405 h1:yhCVgyC4o1eVCa2tZl7eS0r+SDo693bJlVdllGtEeKM=
Expand Down
2 changes: 1 addition & 1 deletion example/10-ai/llm-sfn-get-ip-and-latency/go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ require (
github.com/caarlos0/env/v6 v6.10.1 // indirect
github.com/google/uuid v1.6.0 // indirect
github.com/lmittmann/tint v1.0.7 // indirect
github.com/sashabaranov/go-openai v1.36.1 // indirect
github.com/sashabaranov/go-openai v1.37.0 // indirect
golang.org/x/net v0.34.0 // indirect
golang.org/x/sync v0.10.0 // indirect
golang.org/x/sys v0.29.0 // indirect
Expand Down
4 changes: 2 additions & 2 deletions example/10-ai/llm-sfn-get-ip-and-latency/go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,8 @@ github.com/lmittmann/tint v1.0.7 h1:D/0OqWZ0YOGZ6AyC+5Y2kD8PBEzBk6rFHVSfOqCkF9Y=
github.com/lmittmann/tint v1.0.7/go.mod h1:HIS3gSy7qNwGCj+5oRjAutErFBl4BzdQP6cJZ0NfMwE=
github.com/pmezard/go-difflib v1.0.1-0.20181226105442-5d4384ee4fb2 h1:Jamvg5psRIccs7FGNTlIRMkT8wgtp5eCXdBlqhYGL6U=
github.com/pmezard/go-difflib v1.0.1-0.20181226105442-5d4384ee4fb2/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4=
github.com/sashabaranov/go-openai v1.36.1 h1:EVfRXwIlW2rUzpx6vR+aeIKCK/xylSrVYAx1TMTSX3g=
github.com/sashabaranov/go-openai v1.36.1/go.mod h1:lj5b/K+zjTSFxVLijLSTDZuP7adOgerWeFyZLUhAKRg=
github.com/sashabaranov/go-openai v1.37.0 h1:hQQowgYm4OXJ1Z/wTrE+XZaO20BYsL0R3uRPSpfNZkY=
github.com/sashabaranov/go-openai v1.37.0/go.mod h1:lj5b/K+zjTSFxVLijLSTDZuP7adOgerWeFyZLUhAKRg=
github.com/stretchr/testify v1.10.0 h1:Xv5erBjTwe/5IxqUQTdXv5kgmIvbHo3QQyRwhJsOfJA=
github.com/stretchr/testify v1.10.0/go.mod h1:r2ic/lqez/lEtzL7wO/rwa5dbSLXVDPFyf8C91i36aY=
golang.org/x/net v0.0.0-20210316092652-d523dce5a7f4/go.mod h1:RBQZq4jEuRlivfhVLdyRGr576XBO4/greRjx4P4O3yc=
Expand Down
2 changes: 1 addition & 1 deletion example/10-ai/llm-sfn-get-weather/go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ require github.com/yomorun/yomo v1.18.7
require (
github.com/caarlos0/env/v6 v6.10.1 // indirect
github.com/lmittmann/tint v1.0.7 // indirect
github.com/sashabaranov/go-openai v1.36.1 // indirect
github.com/sashabaranov/go-openai v1.37.0 // indirect
gopkg.in/natefinch/lumberjack.v2 v2.2.1 // indirect
)

Expand Down
4 changes: 2 additions & 2 deletions example/10-ai/llm-sfn-get-weather/go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,8 @@ github.com/lmittmann/tint v1.0.7 h1:D/0OqWZ0YOGZ6AyC+5Y2kD8PBEzBk6rFHVSfOqCkF9Y=
github.com/lmittmann/tint v1.0.7/go.mod h1:HIS3gSy7qNwGCj+5oRjAutErFBl4BzdQP6cJZ0NfMwE=
github.com/pmezard/go-difflib v1.0.1-0.20181226105442-5d4384ee4fb2 h1:Jamvg5psRIccs7FGNTlIRMkT8wgtp5eCXdBlqhYGL6U=
github.com/pmezard/go-difflib v1.0.1-0.20181226105442-5d4384ee4fb2/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4=
github.com/sashabaranov/go-openai v1.36.1 h1:EVfRXwIlW2rUzpx6vR+aeIKCK/xylSrVYAx1TMTSX3g=
github.com/sashabaranov/go-openai v1.36.1/go.mod h1:lj5b/K+zjTSFxVLijLSTDZuP7adOgerWeFyZLUhAKRg=
github.com/sashabaranov/go-openai v1.37.0 h1:hQQowgYm4OXJ1Z/wTrE+XZaO20BYsL0R3uRPSpfNZkY=
github.com/sashabaranov/go-openai v1.37.0/go.mod h1:lj5b/K+zjTSFxVLijLSTDZuP7adOgerWeFyZLUhAKRg=
github.com/stretchr/testify v1.10.0 h1:Xv5erBjTwe/5IxqUQTdXv5kgmIvbHo3QQyRwhJsOfJA=
github.com/stretchr/testify v1.10.0/go.mod h1:r2ic/lqez/lEtzL7wO/rwa5dbSLXVDPFyf8C91i36aY=
gopkg.in/natefinch/lumberjack.v2 v2.2.1 h1:bBRl1b0OH9s/DuPhuXpNl+VtCaJXFZ5/uEFST95x9zc=
Expand Down
2 changes: 1 addition & 1 deletion example/10-ai/llm-sfn-timezone-calculator/go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ require github.com/yomorun/yomo v1.18.8
require (
github.com/caarlos0/env/v6 v6.10.1 // indirect
github.com/lmittmann/tint v1.0.7 // indirect
github.com/sashabaranov/go-openai v1.36.1 // indirect
github.com/sashabaranov/go-openai v1.37.0 // indirect
gopkg.in/natefinch/lumberjack.v2 v2.2.1 // indirect
)

Expand Down
Loading

0 comments on commit 344800c

Please sign in to comment.