parameters:
    openai.api_key: '%env(OPENAI_API_KEY)%'
    main.api.base_url: '%env(MAIN_API_BASE_URL)%'

services:
    _defaults:
        autowire: true
        autoconfigure: true

    App\:
        resource: '../src/'
        exclude:
            - '../src/DependencyInjection/'
            - '../src/Entity/'
            - '../src/Kernel.php'

    App\Service\OpenAIService:
        arguments:
            $apiKey: '%openai.api_key%'

    App\Service\ContentFetcherService:
        arguments:
            $mainApiBaseUrl: '%main.api.base_url%'

    # Service de cache pour les performances
    App\Service\CacheService:
        arguments:
            $cache: '@cache.app'

    App\Service\IntelligentSearchService:
        arguments:
            $cacheService: '@App\Service\CacheService'