Yikes this really is quite advanced.
I guess if custom tools came with enough richness they could accomplish this… it does feel like a bit of a rube goldberg machine but imagine.
- IF a configuration with a persona:
- Forces tool calls
- Has a custom tool forced and it has NO params
- THEN we invoke no LLM and simply pass control to the tool
- THEN we give the tool enough infra to stream results back to the app via inversion of control in some fashion
Its a pretty staggering amount of change and would end up being an absolute bear to maintain.
I guess an alternative is for you to define a new custom plugin that depends on Discourse-AI and defines your own Dialect and Endpoint - it is certainly the simplest way to go about this.