yGuy / chatgpt-mattermost-bot

A very simple implementation of a service for a mattermost bot that uses ChatGPT in the backend.
MIT License
145 stars 49 forks source link

The images that chatgpt puts are not seen in mattermost #14

Closed NexusEFR closed 1 year ago

NexusEFR commented 1 year ago

You only see image error icons from imgur.com or a mini icon of a broken graphic. Is any bot configuration necessary? Bot as admin or as a team user?

WantToLearnJapanese commented 1 year ago

AFAIK the problem is the difference between the Markdown format that MM supports and ChatGPT outputs.

As a workaround, you could manually modify the broken syntax for image links.

NexusEFR commented 1 year ago

AFAIK the problem is the difference between the Markdown format that MM supports and ChatGPT outputs.

As a workaround, you could manually modify the broken syntax for image links.

Thanks for the clarification and the fast response, although I don't know how to make that manual change or where to make it to see the image. I have an MM instance through Omnibus in Ubuntu and the docker in a Nas/Qnap. Regards. 😃

WantToLearnJapanese commented 1 year ago

AFAIK the problem is the difference between the Markdown format that MM supports and ChatGPT outputs.

As a workaround, you could manually modify the broken syntax for image links.

Thanks for the clarification and the fast response, although I don't know how to make that manual change or where to make it to see the image. I have an MM instance through Omnibus in Ubuntu and the docker in a Nas/Qnap. Regards. 😃

Are you not a channel moderator? I was able to edit what ChatGPT bot says.

NexusEFR commented 1 year ago

AFAIK the problem is the difference between the Markdown format that MM supports and ChatGPT outputs.

As a workaround, you could manually modify the broken syntax for image links.

Thanks for the clarification and the fast response, although I don't know how to make that manual change or where to make it to see the image. I have an MM instance through Omnibus in Ubuntu and the docker in a Nas/Qnap. Regards. 😃

Are you not a channel moderator? I was able to edit what ChatGPT bot says.

Oh sorry, I didn't realize what you were referring to. It's true that as an admin, I can edit messages. But I see that the link format is the same as the ones used for GIFs, like this example. ! [Off to work](https://thumbs.gfycat.com/ WhiteOptimisticGrackle-size_restricted.gif) And if I follow the link Chatgpt provided, the image is not found on the web either. Here is an image that Chatgpt posted according to a request... ![Diagrama de la línea de ascensión al trono de los Reyes Católicos](htt ps://upload.wikimedia.org/wikipedia/commons/7/70/Lausanne_Memorial39%28cropped%29.jpg)

NexusEFR commented 1 year ago

AFAIK the problem is the difference between the Markdown format that MM supports and ChatGPT outputs.

As a workaround, you could manually modify the broken syntax for image links.

Thanks for the clarification and the fast response, although I don't know how to make that manual change or where to make it to see the image. I have an MM instance through Omnibus in Ubuntu and the docker in a Nas/Qnap. Regards. 😃

Are you not a channel moderator? I was able to edit what ChatGPT bot says.

Oh sorry, I didn't realize what you were referring to. It's true that as an admin, I can edit messages. But I see that the link format is the same as the ones used for GIFs, like this example. ! [Off to work](https://thumbs.gfycat.com/ WhiteOptimisticGrackle-size_restricted.gif) And if I follow the link Chatgpt provided, the image is not found on the web either. Here is an image that Chatgpt posted according to a request... ![Diagrama de la línea de ascensión al trono de los Reyes Católicos](htt ps://upload.wikimedia.org/wikipedia/commons/7/70/Lausanne_Memorial39%28cropped%29.jpg)

There are spaces in the links to be able to show the link without github trying to compose the image and to be able to see the original link from the MM. It is understood?

yGuy commented 1 year ago

Well, then ChatGPT hallucinated an URL. This is quite common and not something we can fix, I guess. ChatGPT is instructed to respond with markdown, but you cannot force it to create proper URLs. I don't think this is a problem with the plugin, but rather ChatGPT's "knowledge".

If this doesn't help, please post the exact response (you can crank up the logging to get all the details) and if you can come up with a way to "fix" the urls, this could be done via some postprocessing in the plugin.

yGuy commented 1 year ago

I think this is working as expected: image

NexusEFR commented 1 year ago

Here is the image that chatgpt returns to a request for an image of a spine :

image

And this is the link it points to, if you follow it you can't see any image " https://i.imgur.com/ze6dJJU.png ". I put the previous example using gifcat inside MM to compare the type of link used by MM and ChatGPT, the issue is that the image links returned by ChatGPT are not valid.

image

https://i.imgur.com/ze6dJJU.png

yGuy commented 1 year ago

Correct. the Fault is not with the plugin, but with ChatGPT or the image source (which may have been removed in the meantime). I don't think it's the job of the plugin to validate and (try to) fix the image url. That's why I closed the issue. It's not a bug in the plugin.