#discord bot via GPT
1 messages · Page 1 of 1 (latest)
Why not ask chatGPT
By the way just google it and you'll find many tutorials. It's not very hard.
I did lol. But it was my bad, not enough details here. I want a bot, who can analyze images like my gpt does. But therefore I would need an extra ai. It’s very complicated and I don’t think that would bring faster responses than in chatgpt itself.. so I scrapped that idea
You can use gpt-4-vision-preview
It’s the same model used at https://chat.openai.com/
I didn’t found a solution to implement that in discord itself. Is that possible with just the discord api? Thanks
It is, you can check whether a message has an attachment by checking the expression “message.attachments > 0”, then you can get the attachment URL using “message.attachments.first().proxyURL”, then you can send that to the OpenAI API like stated in the docs, then you can get the response and reply to the message using “message.reply()”
Note that this example is using discord.js
It might differ from discord.py or the HTTP API
Thank you so much! That was the first helpful advise I got. After some other answers I thought it wasn’t possible and I scrapped my idea. Will try that one now. Appreciate it, thanks!