translationLanguage = $translationLanguage; $this->translationRegion = $translationRegion; $this->translationEndpoint = $translationEndpoint; $this->translationApiKey = $translationApiKey; $this->prompt = $prompt; $this->model = $model; $this->endpoint = $endpoint; $this->apiKey = $apiKey; } /** * {@inheritDoc} * Returns the Computer Vision API key. */ public function getApiKey(): string { return $this->apiKey; } /** * {@inheritDoc} * Azure does not use custom prompts, returns empty string. */ public function getPrompt(): string { return $this->prompt; } /** * {@inheritDoc} * Returns the API version or empty string if not specified. */ public function getModel(): string { return $this->model; } /** * Get the Azure Computer Vision endpoint URL. * * @return string The endpoint URL (e.g., 'https://computer-vision-france-central.cognitiveservices.azure.com/') */ public function getEndpoint(): string { return $this->endpoint; } /** * Get the Azure Translator API key. * * @return string The translator API key (empty if translation is not configured) */ public function getTranslationApiKey(): string { return $this->translationApiKey; } /** * Get the Azure Translator endpoint URL. * * @return string The translator endpoint URL (empty if translation is not configured) */ public function getTranslationEndpoint(): string { return $this->translationEndpoint; } /** * Get the Azure Translator region. * * @return string The region (e.g., 'westeurope', empty if translation is not configured) */ public function getRegion(): string { return $this->translationRegion; } /** * Get the target language for translation. * * @return string The language code (e.g., 'it', 'fr', 'de', defaults to 'en') */ public function getTranslationLanguage(): string { return $this->translationLanguage; } /** * Check if translation is configured and should be used. * * @return bool True if translation is configured and target language is not English */ public function shouldTranslate(): bool { return !empty($this->translationApiKey) && !empty($this->translationEndpoint) && $this->translationLanguage !== 'en'; } }