Skip to content

Commit

Permalink
Rename a variable
Browse files Browse the repository at this point in the history
  • Loading branch information
xyproto committed Jan 28, 2025
1 parent ecc30b1 commit 0496479
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions v2/massage.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@ import "strings"

// Massage will try to extract a shorter message from a longer LLM output
// using pretty "hacky" string manipulation techniques.
// If the optional noUppercaseLetter argument is false, the first letter will not be made uppercase.
func Massage(generatedOutput string, noUppercaseLetter ...bool) string {
// If the optional uppercaseLetter argument is false, the first letter will not be made uppercase.
func Massage(generatedOutput string, uppercaseLetter ...bool) string {
s := generatedOutput
// Keep the part after ":", if applicable
if strings.Contains(s, ":") {
Expand Down Expand Up @@ -70,7 +70,7 @@ func Massage(generatedOutput string, noUppercaseLetter ...bool) string {
return strings.TrimSpace(generatedOutput)
}

if !(len(noUppercaseLetter) > 0 && !noUppercaseLetter[0]) {
if !(len(uppercaseLetter) > 0 && !uppercaseLetter[0]) {
// Let the first letter be uppercase
s = strings.ToUpper(string([]rune(s)[0])) + string([]rune(s)[1:])
}
Expand Down

0 comments on commit 0496479

Please sign in to comment.