Weave Code
Weaver
Helps Laravel developers discover, compare, and choose open-source packages. See popularity, security, maintainers, and scores at a glance to make better decisions.
Feedback
Share your thoughts, report bugs, or suggest improvements.
Subject
Message
Ai Gemini Platform

Ai Gemini Platform Laravel Package

symfony/ai-gemini-platform

Google Gemini platform bridge for Symfony AI, letting your PHP apps call Gemini's generateContent and streaming endpoints plus batchEmbedContents embeddings through a consistent Symfony AI interface.

View on GitHub
Deep Wiki
Context7

Google Gemini platform bridge for Symfony AI

Frequently asked questions about Ai Gemini Platform
How do I install symfony/ai-gemini-platform in a Laravel application?
Install it with Composer using composer require symfony/ai-gemini-platform. There is no Laravel-native package or facade, so you then bind the Gemini platform and model client into Laravel's container through a small service provider and a config file. Check the symfony/ai-platform version constraint early so it does not collide with anything already in composer.lock.
Which Laravel and PHP versions are supported by this Gemini bridge?
The package is a Symfony AI bridge rather than a Laravel package, so it does not pin Laravel versions directly; it runs wherever its Symfony dependencies and PHP floor are supported. Confirm your PHP runtime before committing, because the changelog references an 8.3 polyfill for json_validate() and the bridge tracks the symfony/ai monorepo release cadence, currently around v0.14. Test your specific Laravel version in CI rather than assuming compatibility.
How do I configure a Google Gemini API key in Laravel?
Put the key in your .env file, expose it through config/services.php, and pass it into the Gemini platform factory when binding the service in your provider. Keep the key out of source control and rotate it like any other third-party credential. Because there is no package-provided config file, you own the config/ai.php or equivalent structure.
Is there a Laravel facade or service provider for Gemini?
No. The bridge implements Symfony AI's Platform contract, and you write the Laravel wiring yourself, typically a GeminiServiceProvider plus a config file. That is roughly half a day for a developer comfortable with Laravel's container and longer for someone who is not. The important discipline is to hide the concrete Platform and ModelClient classes behind an internal interface so controllers, jobs, and Blade views do not depend on Gemini directly.
How do I stream Gemini responses in a Laravel application?
Use the bridge's streaming support for Gemini's generateContent endpoint and return a streamed response from Laravel. Streaming is an end-to-end concern, not just a client call: PHP-FPM worker occupancy, proxy buffering, and any API gateway in front of the app must tolerate server-sent events. Test the full path in staging before shipping a streaming feature.
Can I send images, audio, or PDF documents to Gemini with this package?
Yes. The bridge supports multimodal input including images, audio, and PDF documents through generateContent, and the repository includes binary fixtures for those media types in its tests. Before enabling multimodal features, get sign-off on data-handling policy, because prompts and media leave your application boundary and Gemini retention rules apply. PII review should happen before the first multimodal release, not after.
How do I generate embeddings with Gemini for search or RAG in Laravel?
The bridge wraps Gemini's batchEmbedContents endpoint and supports configurable task types, so you can generate vectors for semantic search or retrieval-augmented generation. Decide whether embeddings are a day-one requirement or a phase-two capability, because that choice changes sequencing and storage design. You will still need to own vector storage, indexing, and refresh jobs in Laravel.
How can I test a Gemini integration without calling the real API?
Mock at the Symfony AI platform or model-client interface rather than mocking raw HTTP wherever possible, and keep a thin internal AI client that your application code uses. The package includes test fixtures for image, audio, and PDF inputs that show the expected media shapes. Avoid hitting the live Gemini API in CI, and add contract tests for your wrapper so provider changes are caught early.
Does symfony/ai-gemini-platform support Vertex AI or only the Gemini API?
This bridge targets the Gemini API surface, including generateContent, streaming, and batchEmbedContents. Vertex AI is a separate path for enterprise data-residency, GCP billing controls, and related governance requirements, so validate those needs independently. If Vertex AI is mandatory for compliance, confirm that before building on this bridge.
Is symfony/ai-gemini-platform production ready and actively maintained?
It is pre-1.0 with a five-star, zero-dependent repository, so there is little independent production battle-testing outside Symfony's own work. The positive signals are that it lives in the symfony/ai monorepo, is maintained by recognizable Symfony core contributors, and has a changelog dense with specific correctness fixes. Pin the version, monitor releases, and accept explicitly that there is no vendor SLA and no built-in async or queue story.
Weaver

How can I help you explore Laravel packages today?

Conversation history is not saved when not logged in.
Prompt
Add packages to context
No packages found.
novasa/laravel-language-center
opencage/geocode
adolfoholzer/parameters
livenetworks/ln-starter
shitoudev/permissionmanager
johannesclimacus/laravel-tui
hocvt/seotools
vitalybaev/sypexgeo
amphibee/themosis-ignition
gito-me/fast-excel
frankyso/laravel-ipaymu
geolize-studio/laravel-chile
boomerangui/chat
cgv/localized-resource
noith/settings
kda/laravel-package
kda/filament-dynamic-navigation
bypersoft/signbox
pairus/product-data
fayne/laravel-filament-cms-core