+2
-4
src/commands/utilities/ai.ts
+2
-4
src/commands/utilities/ai.ts
···
242
242
243
243
Use the wikipedia search when you want to look for information outside of your knowledge, state it came from Wikipedia if used.
244
244
245
-
When you use a tool, you'll receive a JSON response with the command results if needed.
246
-
247
-
**IMPORTANT:** The {reaction:} and {newmessage:} tools are NOT available in slash commands. Only use the tools listed above.`;
245
+
When you use a tool, you'll receive a JSON response with the command results.`;
248
246
249
247
const modelSpecificInstructions = usingDefaultKey
250
248
? '\n\n**IMPORTANT:** Please keep your responses under 3000 characters. Be concise and to the point.'
···
490
488
): Promise<AIResponse | null> {
491
489
try {
492
490
const openAIClient = getOpenAIClient(config.finalApiKey!, config.finalApiUrl);
493
-
const maxTokens = config.usingDefaultKey ? 5000 : 8000;
491
+
const maxTokens = config.usingDefaultKey ? 1000 : 3000;
494
492
const currentConversation = [...conversation];
495
493
let iteration = 0;
496
494
let finalResponse: AIResponse | null = null;
+7
-7
src/utils/voteManager.ts
+7
-7
src/utils/voteManager.ts
···
153
153
);
154
154
}
155
155
} catch (error) {
156
-
logger.error(`Error processing guild ${guild.id}:`, error);
156
+
console.error(`Error processing guild ${guild.id}:`, error);
157
157
}
158
158
}),
159
159
);
160
160
}
161
161
} catch (error) {
162
-
logger.error('Error in vote processing:', error);
162
+
console.error('Error in vote processing:', error);
163
163
} finally {
164
-
clientBot.destroy().catch((err) => logger.error('Error destroying bot client:', err));
164
+
clientBot.destroy().catch(console.error);
165
165
}
166
166
167
167
logger.info(`User ${userId} voted - AI system will give +10 daily limit`);
···
190
190
`\n` +
191
191
`Thank you for your support! ❤️`,
192
192
)
193
-
.catch((err) => logger.error('Failed to send vote DM:', err));
193
+
.catch(console.error);
194
194
}
195
195
196
-
clientBot.destroy().catch((err) => logger.error('Error destroying bot client:', err));
196
+
clientBot.destroy().catch(console.error);
197
197
} catch (error) {
198
-
logger.error('Failed to send vote thank you DM:', error);
198
+
console.error('Failed to send vote thank you DM:', error);
199
199
}
200
200
201
201
await client.query('COMMIT');
···
207
207
};
208
208
} catch (error) {
209
209
await client.query('ROLLBACK');
210
-
logger.error('Error recording vote:', error);
210
+
console.error('Error recording vote:', error);
211
211
throw new Error('Failed to record your vote. Please try again later.');
212
212
} finally {
213
213
client.release();