- What is symfony/ai-open-ai-platform used for?
- It is the OpenAI platform bridge for Symfony AI Platform, exposing OpenAI features as Symfony-compatible AI services. It supports GPT chat completions, embeddings, DALL-E image generation, Whisper transcription, and text-to-speech. The package is still pre-1.0, so pin versions and review changelogs before production use.
- Does symfony/ai-open-ai-platform work with Laravel?
- No, it is not a Laravel package. It is built for Symfony AI Platform and requires Symfony 6.4+ with PHP 8.2+, and it provides no Laravel service provider or facade. Laravel teams could manually wire Symfony services, but that is not an officially supported integration path.
- How do I install symfony/ai-open-ai-platform?
- Install it with Composer using composer require symfony/ai-open-ai-platform. Make sure your application runs PHP 8.2+ and Symfony 6.4+ before adding the bridge. Configure it through Symfony's config/packages system so environment-specific OpenAI settings stay out of code.
- Which Symfony and PHP versions does symfony/ai-open-ai-platform support?
- It officially supports Symfony 6.4+ and PHP 8.2+. That aligns with the Symfony AI release cycle and may require upgrades for older Symfony 5.x applications. Legacy stacks should plan the PHP and Symfony upgrades before adopting the bridge.
- How do I configure my OpenAI API key?
- Use environment variables and Symfony configuration to pass the OpenAI API key securely. The bridge also works with Symfony's parameter_bag for credential management. Authentication is API-key based only, so OAuth and SSO-integrated workflows are not supported.
- Which OpenAI features are supported by this bridge?
- The bridge covers GPT chat completions, embeddings, DALL-E image generation, Whisper audio transcription, and text-to-speech. Version 0.14.0 adds batch requests, realtime sessions, a TokenUsage model property, and model catalog updates. OpenAI fine-tuning endpoints are not abstracted by this package.
- Does symfony/ai-open-ai-platform support streaming and realtime sessions?
- Yes, streaming responses are standardized through DeltaInterface from version 0.7.0. Version 0.14.0 adds realtime sessions for bidirectional audio and voice agents. Realtime use requires WebSocket or WebRTC infrastructure and is not a drop-in fit for plain HTTP controllers.
- How can I test OpenAI calls without hitting the real API?
- Use Symfony's HttpClientMock to simulate OpenAI API responses in your tests. The package includes PHPUnit tests, and version 0.14.0 adds cassette request verification for replay. That makes CI runs more reliable and avoids unnecessary OpenAI API charges.
- How do batch requests work in symfony/ai-open-ai-platform?
- Version 0.14.0 adds batch requests on top of asynchronous jobs for bulk OpenAI processing. You need to configure a batch job queue, such as Symfony Messenger with a dedicated transport, and handle job status polling. This is useful for nightly embeddings or large-scale content moderation, but it still requires operational monitoring.
- What are the main limitations of symfony/ai-open-ai-platform?
- It is limited to OpenAI and does not provide multi-cloud support, so Azure OpenAI or other providers need a custom bridge. Fine-tuning endpoints are not abstracted, and realtime sessions add WebSocket or WebRTC complexity. The package is also pre-1.0, so breaking changes are possible between minor versions.