Closed spinalwiz closed 5 months ago
Can you tell me more about the use case? You could use the client directly instead of getting it via the Laravel client.
Because if you want to use the client directly you'd still have to do all the setup found in the Gemini Laravel service provider.
Giving direct access to the client would give you full access to all of the underlying client functionality without having to worry about configuration and setup.
I'd say it's the same use case as how Laravel Cashier lets you accesses the underlying Stripe client directly:
use Laravel\Cashier\Cashier;
$stripe = Cashier::stripe()
https://laravel.com/docs/10.x/billing#stripe-sdk
Or to give a specific use case, if Gemini::generateText()
fails, there is no way of inspecting the response() to see the failure reason
It would be really helpful to have access to the underlying Gemini Client to provide access to all of the GeminiClient functionality
e.g. in vendor/gemini-api-php/laravel/src/Gemini.php