How to conditionally do `run_oban_trigger`?
I am modifing code from the Ash.AI chat example. I could understand that whenever a message is created, it goes through one of the change
the
So, whenever user type a message and enter, an LLM response is generated. I want to change it to only user explicitly type like "@M, xxxx", then the response from LLM should be triggered.
How to do that?
One solution is to modify the
Can I do trigger the oban in with some condition? especially it would be better to do so in a seperate module, so I could implement complex logic.
Thanks a lot
change run_oban_trigger(:respond) which triggersthe
trigger :respond. So, whenever user type a message and enter, an LLM response is generated. I want to change it to only user explicitly type like "@M, xxxx", then the response from LLM should be triggered.
How to do that?
One solution is to modify the
Response module, is it a good thing? because once reach here, I belive an Oban job is already enqueued. Can I do trigger the oban in with some condition? especially it would be better to do so in a seperate module, so I could implement complex logic.
Thanks a lot
