with every commit, Miku grows stronger.

changed some defaults; added and then decided to drop repetition penalty related hyperparameters; fixed prompt formatting
This commit is contained in:
James Shiffer
2025-01-29 11:25:33 +00:00
parent 21a2b1d4d0
commit 8ef7a03895
7 changed files with 110 additions and 71 deletions

View File

@@ -29,7 +29,8 @@ const REAL_NAMES = { // username to real name mapping
'keliande27': 'Myles Linden',
'1thinker': 'Samuel Habib',
'adam28405': 'Adam Kazerounian',
'shibe.mp4': 'Jake Wong'
'shibe.mp4': 'Jake Wong',
'Hatsune Miku': 'Hatsune Miku'
};
@@ -148,15 +149,20 @@ async function serializeMessageHistory(m: Message): Promise<LLMDiscordMessage |
timestamp: m.createdAt.toUTCString(),
author: m.author.username,
name: REAL_NAMES[m.author.username] || null,
context: undefined,
content: m.cleanContent,
reactions: stringifyReactions(m)
};
// fetch replied-to message, if there is one
if (m.type == MessageType.Reply && m.reference) {
const repliedToMsg = await m.fetchReference();
if (repliedToMsg) {
msgDict.context = repliedToMsg.cleanContent;
try {
const repliedToMsg = await m.fetchReference();
if (repliedToMsg) {
msgDict.context = repliedToMsg.cleanContent;
}
} catch (err) {
logWarn(`[bot] Error fetching replied-to message: ` + err);
}
}