We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 28a3abb commit acd8211Copy full SHA for acd8211
appCommon/src/main/kotlin/com/github/hummel/union/service/impl/BotServiceImpl.kt
@@ -87,7 +87,7 @@ class BotServiceImpl : BotService {
87
if (Random.nextInt(5) == 0) {
88
val channelId = event.channel.id
89
90
- val prompt = chatHistory.getOrDefault(channelId, null)?.take(30)?.joinToString(
+ val prompt = chatHistory.getOrDefault(channelId, null)?.takeLast(30)?.joinToString(
91
prefix = firstChatPrompt,
92
separator = "\r\n"
93
)
0 commit comments