Skip to content

Conversation

@jeffdoubleyou
Copy link

Fix sending options to the MRCPSynth command

Copy link
Member

@Ulexus Ulexus left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for your fix; just a few cleanups

@@ -1,4 +1,4 @@
module github.com/CyCoreSystems/agi
module github.com/jeffdoubleyou/agi
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please exclude this change


ret, err := a.Exec([]string{"MRCPSynth", prompt, opts}...)
execOpts := []string{
fmt.Sprintf(`"%s"`, prompt),
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It's a bit heavy to use fmt.Sprintf() just to wrap a string in double-quotes; maybe just

 `"` + prompt + `"`

?

fmt.Sprintf(`"%s"`, prompt),
opts,
}
ret, err := a.Exec([]string{"MRCPSynth", strings.Join(execOpts, ",")}...)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We shouldn't need to declare a []string{} and then expand it (...), should we?
Maybe just

ret, err := a.Exec("MRCPSynth", strings.Join(execOpts, ","))

?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants