Currently, each callback contacting the AI API follows the same pattern:
- get or request access token
- try the request to the AI API
- handles authorization exceptions
Would it be possible to abstract this flow into a middleware between the callback and the AI API?
Currently, each callback contacting the AI API follows the same pattern:
Would it be possible to abstract this flow into a middleware between the callback and the AI API?