allow looker to view attached files
This commit is contained in:
parent
d2f0026c76
commit
523ef6db75
1 changed files with 7 additions and 3 deletions
|
|
@ -393,12 +393,16 @@ class ChatGPT(commands.Cog):
|
||||||
|
|
||||||
@commands.command(
|
@commands.command(
|
||||||
description="Image GPT4",
|
description="Image GPT4",
|
||||||
help="Ask GPT4 a question about an image. Usage: !question_gpt4 (link) (question)",
|
help="Ask GPT4 a question about an image. Usage: !looker (link) (question)",
|
||||||
brief="Get an answer"
|
brief="Get an answer"
|
||||||
)
|
)
|
||||||
async def looker(self, ctx):
|
async def looker(self, ctx):
|
||||||
image_link = ctx.message.content.split(" ", maxsplit=2)[1]
|
if len(ctx.message.attachments) > 0:
|
||||||
question = ctx.message.content.split(" ", maxsplit=2)[2]
|
image_link = ctx.message.attachments[0].url
|
||||||
|
question = ctx.message.content
|
||||||
|
else:
|
||||||
|
image_link = ctx.message.content.split(" ", maxsplit=2)[1]
|
||||||
|
question = ctx.message.content.split(" ", maxsplit=2)[2]
|
||||||
|
|
||||||
data = {
|
data = {
|
||||||
"model": "gpt-4-vision-preview",
|
"model": "gpt-4-vision-preview",
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue