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 50 forks source link

yFiles for HTML 2.5 not working #31

Closed dwinurhadia closed 1 year ago

dwinurhadia commented 1 year ago

Dear Team, I've already deploy docker chatgpt-mattermost-bot using yFiles HTML, but the image is now show correctly

it show like this https://prnt.sc/9z9Nt8pY8jek

<GRAPH>{
  "nodes":[
    {"id":"Herbivore","label":"Herbivore","type":"animal"},
    {"id":"Plants","label":"Plants","type":"food"},
  ],
  "edges":[
    {"from":"Herbivore","to":"Plants","label":"eats","type":"consumes"}
  ],
  "types":[
    {"name":"animal","shape":"ellipse","color":"#fff","thickness":2,"size":30},
    {"name":"food","shape":"ellipse","color":"#fff","thickness":2,"size":25},
    {"name":"consumes","thickness":1,"color":"#000","label":"consumes"}
  ],
  "layout":"organic"
}</GRAPH>

In the console log

chatgpt-mattermost-bot-chatbot-1 | {"level":"ERROR","time":"2023-05-10T05:45:32.466Z","name":"bot","msg":"request to http://localhost:4242/json-to-svg failed, reason: connect ECONNREFUSED 127.0.0.1:4242","pid":1,"hostname":"ece245de25a2","diff":0,"err":{"msg":"request to http://localhost:4242/json-to-svg failed, reason: connect ECONNREFUSED 127.0.0.1:4242","name":"FetchError","stack":"FetchError: request to http://localhost:4242/json-to-svg failed, reason: connect ECONNREFUSED 127.0.0.1:4242\n at ClientRequest.<anonymous> (/app/node_modules/node-fetch/lib/index.js:1505:11)\n at ClientRequest.emit (node:events:513:28)\n at Socket.socketErrorListener (node:_http_client:494:9)\n at Socket.emit (node:events:513:28)\n at emitErrorNT (node:internal/streams/destroy:157:8)\n at emitErrorCloseNT (node:internal/streams/destroy:122:3)\n at processTicksAndRejections (node:internal/process/task_queues:83:21)","message":"request to http://localhost:4242/json-to-svg failed, reason: connect ECONNREFUSED 127.0.0.1:4242","type":"system","errno":"ECONNREFUSED","code":"ECONNREFUSED"}}

Is that issue compatibility or still development features if using yFiles?

yGuy commented 1 year ago

The problem is that on 127.0.0.1:4242 there is no yFiles for HTML Mattermost plugin server running. It cannot, though, because it has not yet even been released. If you have it, you somehow got it from our development system ;-)

See the note in the README:

Note The YFILES_SERVER_URL is used for automatically converting text information created by the bot into diagrams. This is currently in development. You can see it in action, here: LinkedIn Post If you are interested in getting your hands on the plugin, please contact yWorks!

Send an email to the our team if you want to get on the early access program list. The plugin is not yet avaible, but you can try a very similar version on our free online graph editor yEd-Live!

dwinurhadia commented 1 year ago

Dear @yGuy Thanks for the clarifications