yGuy / chatgpt-mattermost-bot

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

Custom BOT name not working #5

Closed rusty1281 closed 1 year ago

rusty1281 commented 1 year ago

1st off thank you for this implementation with MM. Works really well.

I have pulled the latest code and build it into a docker image and wanted to test out the custom name option. Atm I am unable to get it working in any way. I have tried to use the exiting MM bot with it, a new one but nothing works and there are no error logs at all. It just doesn't respond.

Any info on that front?

Tried to use the variable with " ", with ' ', with or without @ but nothing helps.

Any info on this would be great!

Thanks again!

yGuy commented 1 year ago

Debugging this shouldn't be too difficult. Just clone the repo and run the node script after an npm install. You can add arbitrary console.logs in there, if you don't want to attach a debugger. It shouldn't be too hard to find the problem. I haven't implemented this part and never tested it myself, but the code looked fine. There should really only be one usage in the code:

https://github.com/yGuy/chatgpt-mattermost-bot/blob/1bb5f84273f68f1e42a23a2db6798b1b9723e4a0/src/botservice.js#L31

lyca-knight commented 1 year ago

This works for me without Issue: MATTERMOST_BOTNAME: "@glados"

rusty1281 commented 1 year ago

Debugging this shouldn't be too difficult. Just clone the repo and run the node script after an npm install. You can add arbitrary console.logs in there, if you don't want to attach a debugger. It shouldn't be too hard to find the problem. I haven't implemented this part and never tested it myself, but the code looked fine. There should really only be one usage in the code:

https://github.com/yGuy/chatgpt-mattermost-bot/blob/1bb5f84273f68f1e42a23a2db6798b1b9723e4a0/src/botservice.js#L31

Tnx for getting back to me. Ofc this was a fail on my end. Once I checked the container running I noticed that the botservice.js was the old version. Ofc I downloaded the new code but build it from the cache. Idiot.

All is well now.

Thanks again!