vizovitin / foundryvtt-ask-chatgpt

Customizable ChatGPT integration for Foundry VTT
https://foundryvtt.com/packages/ask-chatgpt
MIT License
4 stars 6 forks source link

createChatMessage support #5

Open rexmortus opened 1 year ago

rexmortus commented 1 year ago

Hello! As a fellow LLM enthusiast, I was so excited to find your plugin. I love being able to generate flavour text right in the chat window.

Just one thing... I have created some macros that create chat messages, and I note that your plugin does not register a hook for those events. So, I have to type my question manually each time to trigger the 'chatMessage' hook.

Is there any way you would consider supporting the 'createChatMessage' hook, so that I could trigger your plugin when creating chat messages of my own?

rexmortus commented 1 year ago

Or maybe even better, could the module expose the respondTo() method? Because then, it could be called from anywhere which would be great.

vizovitin commented 1 year ago

It's an interesting use case. Thanks for bringing this to my attention!

Could you provide an example minimal macro that creates a chat message, that you would like the module to respond to?

Could you also provide a mock macro that would use something like a respondTo() method? And maybe some example use cases, if you don't mind.

Just so our understanding is aligned. 😃