Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion go.mod
Original file line number Diff line number Diff line change
@@ -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


require github.com/pkg/errors v0.8.1

Expand Down
7 changes: 5 additions & 2 deletions mrcp.go
Original file line number Diff line number Diff line change
Expand Up @@ -108,8 +108,11 @@ type SynthResult struct {
func (a *AGI) MRCPSynth(prompt string, opts string) (res *SynthResult, err error) {
var cause string
res = new(SynthResult)

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 + `"`

?

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, ","))

?

if err != nil {
return
}
Expand Down