SuperSeller3000/config/services.yaml
Simon Kuehn 49e36a0a06 feat: editable AI prompt templates and articleType context in specs research
All agent prompts are now stored in app.prompt_templates (migration 20260519000000)
and editable by admins via the new AI Prompts CRUD page. If no DB entry exists
for a key the hardcoded default is used automatically as fallback.

PromptTemplateService renders templates with {{variable}} substitution.
All four agents (SpecsResearch, JsonCoding, EbayText, OllamaVision) use the service.

SpecsResearchAgent now receives the articleType name (e.g. "Laptop") so the
specs prompt is scoped to the correct device category instead of being generic.
SpecsResearchHandler loads the ArticleType from the repository for this purpose.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-05-18 07:19:02 +00:00

163 lines
6.1 KiB
YAML

parameters:
services:
_defaults:
autowire: true
autoconfigure: true
App\:
resource: '../src/'
exclude:
- '../src/Domain/'
- '../src/Kernel.php'
App\Domain\Article\Repository\ArticleRepositoryInterface:
alias: App\Infrastructure\Persistence\Repository\DoctrineArticleRepository
App\Domain\Article\Repository\ArticleTypeRepositoryInterface:
alias: App\Infrastructure\Persistence\Repository\DoctrineArticleTypeRepository
App\Domain\Channel\Repository\PlatformRepositoryInterface:
alias: App\Infrastructure\Persistence\Repository\DoctrinePlatformRepository
App\Domain\Order\Repository\CustomerRepositoryInterface:
alias: App\Infrastructure\Persistence\Repository\DoctrineCustomerRepository
App\Domain\Order\Repository\OrderRepositoryInterface:
alias: App\Infrastructure\Persistence\Repository\DoctrineOrderRepository
App\Domain\Storage\Repository\StoragePathRepositoryInterface:
alias: App\Infrastructure\Persistence\Repository\DoctrineStoragePathRepository
App\Domain\Article\Repository\ArticlePhotoRepositoryInterface:
alias: App\Infrastructure\Persistence\Repository\DoctrineArticlePhotoRepository
App\Domain\Article\Repository\AttributeValueRepositoryInterface:
alias: App\Infrastructure\Persistence\Repository\DoctrineAttributeValueRepository
App\Domain\Channel\Repository\ChannelFieldRepositoryInterface:
alias: App\Infrastructure\Persistence\Repository\DoctrineChannelFieldRepository
App\Domain\Channel\Repository\ArticleTypePlatformConfigRepositoryInterface:
alias: App\Infrastructure\Persistence\Repository\DoctrineArticleTypePlatformConfigRepository
App\Domain\Channel\Repository\AttributeMappingRepositoryInterface:
alias: App\Infrastructure\Persistence\Repository\DoctrineAttributeMappingRepository
App\Application\Storage\StorageManagerInterface:
alias: App\Infrastructure\Storage\LocalStorageManager
App\Domain\Auth\Repository\UserRepositoryInterface:
alias: App\Infrastructure\Persistence\Repository\DoctrineUserRepository
App\Domain\Auth\Repository\ApiKeyRepositoryInterface:
alias: App\Infrastructure\Persistence\Repository\DoctrineApiKeyRepository
# Switch between Ollama and Mistral by changing the alias target below
App\Infrastructure\AI\OllamaClientInterface:
alias: App\Infrastructure\AI\MistralClient
App\Infrastructure\AI\OllamaClient:
arguments:
$ollamaBaseUrl: '%env(OLLAMA_BASE_URL)%'
App\Infrastructure\AI\MistralClient:
arguments:
$mistralApiKey: '%env(MISTRAL_API_KEY)%'
$mistralBaseUrl: '%env(MISTRAL_BASE_URL)%'
App\Infrastructure\AI\AiConfigService:
arguments:
$visionModel: '%env(AI_VISION_MODEL)%'
$textModel: '%env(AI_TEXT_MODEL)%'
$ollamaBaseUrl: '%env(OLLAMA_BASE_URL)%'
$mistralBaseUrl: '%env(MISTRAL_BASE_URL)%'
$mistralApiKey: '%env(MISTRAL_API_KEY)%'
App\Infrastructure\AI\Agent\OllamaVisionAgent:
arguments:
$model: '%env(AI_VISION_MODEL)%'
App\Infrastructure\AI\Agent\SpecsResearchAgent:
arguments:
$model: '%env(AI_TEXT_MODEL)%'
App\Infrastructure\AI\Agent\JsonCodingAgent:
arguments:
$model: '%env(AI_TEXT_MODEL)%'
App\Infrastructure\AI\Agent\EbayTextAgent:
arguments:
$model: '%env(AI_TEXT_MODEL)%'
App\Domain\Pipeline\Repository\AIPipelineJobRepositoryInterface:
alias: App\Infrastructure\Persistence\Repository\DoctrineAIPipelineJobRepository
App\Domain\AI\Repository\PromptTemplateRepositoryInterface:
alias: App\Infrastructure\Persistence\Repository\DoctrinePromptTemplateRepository
App\Infrastructure\Console\BackupCommand:
arguments:
$backupDir: '%kernel.project_dir%/var/backups'
$databaseUrl: '%env(DATABASE_URL)%'
App\Application\Channel\ChannelAdapterRegistry:
arguments:
$adapters: !tagged_iterator app.channel_adapter
App\Infrastructure\Channel\Ebay\EbayAdapter:
tags: ['app.channel_adapter']
App\Infrastructure\Channel\Ebay\EbayOAuthClient:
arguments:
$clientId: '%env(EBAY_CLIENT_ID)%'
$clientSecret: '%env(EBAY_CLIENT_SECRET)%'
$oauthBaseUrl: '%env(EBAY_OAUTH_BASE_URL)%'
$cache: '@cache.app'
App\Infrastructure\Channel\Ebay\EbayInventoryApiClient:
arguments:
$apiBaseUrl: '%env(EBAY_API_BASE_URL)%'
$marketplaceId: '%env(EBAY_MARKETPLACE_ID)%'
App\Infrastructure\Channel\Ebay\EbayTaxonomyService:
arguments:
$apiBaseUrl: '%env(EBAY_API_BASE_URL)%'
$marketplaceId: '%env(EBAY_MARKETPLACE_ID)%'
$cache: '@cache.app'
App\Infrastructure\Channel\Ebay\EbayWebhookVerifier:
arguments:
$verificationToken: '%env(EBAY_VERIFICATION_TOKEN)%'
$endpointUrl: '%env(EBAY_ENDPOINT_URL)%'
App\Domain\Order\Repository\InvoiceRepositoryInterface:
alias: App\Infrastructure\Persistence\Repository\DoctrineInvoiceRepository
App\Infrastructure\Channel\Frappe\FrappeHttpClient:
arguments:
$baseUrl: '%env(FRAPPE_ERP_BASE_URL)%'
$apiKey: '%env(FRAPPE_ERP_API_KEY)%'
$apiSecret: '%env(FRAPPE_ERP_API_SECRET)%'
App\Infrastructure\Channel\Frappe\FrappeErpAdapter:
arguments:
$genericItemCode: '%env(FRAPPE_GENERIC_ITEM_CODE)%'
App\Application\Order\ErpAdapterInterface:
alias: App\Infrastructure\Channel\Frappe\FrappeErpAdapter
App\Application\Order\CustomerResolverInterface:
alias: App\Infrastructure\Order\CustomerResolver
App\Application\Order\InvoiceMailerInterface:
alias: App\Infrastructure\Mail\SymfonyInvoiceMailer
App\Infrastructure\Mail\SymfonyInvoiceMailer:
arguments:
$supplierEmail: '%env(SUPPLIER_EMAIL)%'
$senderEmail: '%env(SENDER_EMAIL)%'
App\Infrastructure\Channel\Ebay\EbayFulfillmentApiClient:
arguments:
$apiBaseUrl: '%env(EBAY_API_BASE_URL)%'