Skip to content

Commit 91b674a

Browse files
committed
fix vision model
discord updates added more security to attachments, removed the "cleaning" function
1 parent 96d130a commit 91b674a

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

events/messageCreate.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -63,8 +63,8 @@ async function buildConversationLog(message, client) {
6363
conversationLog.push({ role: 'user', content: transcribedContent });
6464
} else if (client.currentModel === GPT_V && message.attachments.size > 0) {
6565
const imageAttachment = message.attachments.first();
66-
const imageUrl = imageAttachment.url.split('?')[0];
67-
console.log(`Cleaned Image URL: ${imageUrl}`);
66+
const imageUrl = imageAttachment.url; // Keep the entire URL including query parameters
67+
console.log(`Image URL: ${imageUrl}`);
6868
conversationLog.push({
6969
role: 'user',
7070
content: [{ type: "text", text: message.content }, { type: "image_url", image_url: imageUrl }],

0 commit comments

Comments
 (0)