From 049647930750c0154bdfd18215f0eeae343010b7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Alexander=20F=2E=20R=C3=B8dseth?= Date: Tue, 28 Jan 2025 16:23:29 +0100 Subject: [PATCH] Rename a variable --- v2/massage.go | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/v2/massage.go b/v2/massage.go index f4496d9..b1e6dbf 100644 --- a/v2/massage.go +++ b/v2/massage.go @@ -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, ":") { @@ -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:]) }