laravel
🚀
openai
🚀
facades
🚀
mocking
🚀
Mocking OpenAi-PHP
This is a known limitation on this library. I explain a work around here https://github.com/openai-php/laravel/issues/23#issuecomment-1499510702
This uses Laravel's RealTime Facades 🚀🚀 to wrap the library and then mock it so I can work on the UI or test my controllers.
Even better with the https://spatie.be/docs/laravel-data/v3/introduction library could be used to return a consistent easy to access data object.