I am working on a particular use case (owing to security constraints) wherein I am using n8n to orchestrate the web chat, however the chat responses are not generated by n8n AI module, infact there is no AI module in the entire chatflow.
here is how the simplified workflow looks: webchat ↔ n8n ↔ external AI ↔ n8n ↔ webchat
the way I am achieving this is using Wait node and resumeUrl: webchat ↔ n8n ↔ wait (resume on webhook) ↔ external AI ↔ webhook ↔ n8n ↔ webchat.
But I am facing a problem, the resumeUrl is a single response endpoint and at times the the external AI has to send multiple responses. the number of response payload that the external AI will generate is not known, hence only one wait is added and we end up loosing trailing messages
I tried replacing the wait with a webhook passing and receiving sessionId back, this method does not all send to chat to work
Does anyone know how to solve this use case, really appreciate any guidance