Skip to content

Commit 28cc707

Browse files
committed
ignore case for cleaning up
1 parent f4683b1 commit 28cc707

File tree

1 file changed

+2
-2
lines changed
  • src/main/kotlin/dev/storozhenko/familybot/feature/talking/services/rag

1 file changed

+2
-2
lines changed

src/main/kotlin/dev/storozhenko/familybot/feature/talking/services/rag/RagService.kt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -71,9 +71,9 @@ class RagService(
7171
if (text == null) return null
7272
var clean: String = text
7373
for (alias in botConfig.botNameAliases) {
74-
clean = clean.replace(alias, "")
74+
clean = clean.replace(alias, "", ignoreCase = true)
7575
}
76-
return clean.replace(botConfig.botName, "")
76+
return clean.replace(botConfig.botName, "", ignoreCase = true)
7777
}
7878

7979
suspend fun getContext(context: ExecutorContext, chatMessages: MutableList<ChatMessage>): String {

0 commit comments

Comments
 (0)