Tôi vẫn nhớ rất rõ ngày hôm đó — deadline báo cáo quý gần kề, 3.000 sản phẩm cần viết mô tả cho 5 thị trường khác nhau. Đội ngũ content của tôi làm việc 16 tiếng liên tục, nhưng kết quả vẫn không đồng đều. Và rồi API gọi hàng loạt của tôi gặp lỗi: ConnectionError: timeout after 30s. 47 yêu cầu API cùng lúc, tất cả đều thất bại. Tôi mất 3 ngày để khắc phục và viết lại toàn bộ.

Bài viết này là toàn bộ kinh nghiệm thực chiến của tôi — từ những lỗi đau thương nhất đến giải pháp tối ưu với HolySheep AI, giúp bạn tiết kiệm 85%+ chi phí và đạt độ trễ dưới 50ms.

Tại Sao Cần AI Batch Generation Cho E-commerce?

Trong ngành thương mại điện tử xuyên biên giới, nội dung sản phẩm là yếu tố quyết định tỷ lệ chuyển đổi. Theo nghiên cứu của Baymard Institute, 18% người mua hàng bỏ giỏ vì mô tả sản phẩm không đủ thuyết phục. Với 5 thị trường (Mỹ, Đức, Nhật, Hàn, Việt Nam), bạn cần tối thiểu 5 phiên bản mô tả cho mỗi sản phẩm.

Kiến Trúc Hệ Thống Batch Generation

1. Cấu Trúc Request批量请求结构

import requests
import json
import asyncio
import aiohttp
from typing import List, Dict
from concurrent.futures import ThreadPoolExecutor
import time

=== CẤU HÌNH HOLYSHEEP AI ===

BASE_URL = "https://api.holysheep.ai/v1" API_KEY = "YOUR_HOLYSHEEP_API_KEY" # Thay thế bằng API key của bạn

ĐA NGÔN NGỮ - 5 thị trường

TARGET_LOCALES = { "en_US": {"market": "Amazon US", "currency": "USD", "tone": "professional"}, "de_DE": {"market": "Amazon DE", "currency": "EUR", "tone": "formal"}, "ja_JP": {"market": "Rakuten", "currency": "JPY", "tone": "humble"}, "ko_KR": {"market": "Coupang", "currency": "KRW", "tone": "enthusiastic"}, "vi_VN": {"market": "Shopee VN", "currency": "VND", "tone": "friendly"} }

Tỷ giá: ¥1 = $1 (HolySheep sử dụng USD nội bộ)

EXCHANGE_RATE_CNY_TO_USD = 1.0 class HolySheepBatchClient: """ Client batch generation cho HolySheep AI - Hỗ trợ multi-language - Retry logic tự động - Token usage tracking """ def __init__(self, api_key: str, base_url: str = BASE_URL): self.api_key = api_key self.base_url = base_url self.session = requests.Session() self.session.headers.update({ "Authorization": f"Bearer {api_key}", "Content-Type": "application/json" }) self.cost_tracker = {"total_tokens": 0, "total_cost_usd": 0} def generate_description(self, product: Dict, locale: str) -> Dict: """ Sinh mô tả sản phẩm cho một ngôn ngữ cụ thể Args: product: Dict chứa thông tin sản phẩm locale: Mã ngôn ngữ (en_US, de_DE, ja_JP, ko_KR, vi_VN) Returns: Dict chứa mô tả đã sinh và metadata """ config = TARGET_LOCALES[locale] prompt = self._build_prompt(product, locale, config) # Tính tokens dự kiến (rough estimate) estimated_tokens = len(prompt) // 4 + 500 # prompt + response start_time = time.time() try: response = self.session.post( f"{self.base_url}/chat/completions", json={ "model": "gpt-4.1", # $8/MTok - chất lượng cao nhất "messages": [ {"role": "system", "content": self._get_system_prompt(locale, config)}, {"role": "user", "content": prompt} ], "max_tokens": 800, "temperature": 0.7 }, timeout=30 ) elapsed_ms = (time.time() - start_time) * 1000 if response.status_code == 200: data = response.json() content = data["choices"][0]["message"]["content"] usage = data.get("usage", {}) # Cập nhật cost tracker tokens_used = usage.get("total_tokens", estimated_tokens) cost = (tokens_used / 1_000_000) * 8 # GPT-4.1: $8/MTok self.cost_tracker["total_tokens"] += tokens_used self.cost_tracker["total_cost_usd"] += cost return { "success": True, "locale": locale, "content": content, "tokens_used": tokens_used, "latency_ms": round(elapsed_ms, 2), "cost_usd": round(cost, 4), "market": config["market"] } else: return { "success": False, "locale": locale, "error": f"HTTP {response.status_code}: {response.text}", "latency_ms": round(elapsed_ms, 2) } except requests.exceptions.Timeout: return { "success": False, "locale": locale, "error": "ConnectionError: timeout after 30s", "latency_ms": 30000 } except requests.exceptions.ConnectionError as e: return { "success": False, "locale": locale, "error": f"ConnectionError: {str(e)}", "latency_ms": 0 } def batch_generate(self, products: List[Dict], max_workers: int = 10) -> List[Dict]: """ Sinh mô tả cho nhiều sản phẩm với multi-threading Args: products: Danh sách sản phẩm max_workers: Số luồng song song (tối đa khuyến nghị: 10) Returns: Danh sách kết quả cho tất cả sản phẩm x tất cả ngôn ngữ """ tasks = [] for product in products: for locale in TARGET_LOCALES.keys(): tasks.append((product, locale)) results = [] with ThreadPoolExecutor(max_workers=max_workers) as executor: futures = [ executor.submit(self.generate_description, product, locale) for product, locale in tasks ] for future in futures: results.append(future.result()) return results def _build_prompt(self, product: Dict, locale: str, config: Dict) -> str: """Xây dựng prompt theo từng ngôn ngữ và thị trường""" locale_prompts = { "en_US": f"""Write a compelling Amazon US product description for: Product: {product['name']} Features: {', '.join(product.get('features', []))} Price: ${product['price_usd']} Requirements: - Start with a hook sentence - Highlight 3 key benefits - Include SEO keywords naturally - End with clear CTA - 150-200 words""", "de_DE": f"""Schreiben Sie eine professionelle Produktbeschreibung für Amazon DE: Produkt: {product['name']} Merkmale: {', '.join(product.get('features', []))} Preis: €{product['price_eur']} Anforderungen: - Formelle, respektvolle Ansprache - Betonung der Qualität und Zuverlässigkeit - Deutsche SEO-Schlüsselwörter einbinden - 150-200 Wörter""", "ja_JP": f"""商品をotinunoで宣伝するための説明文を書いてください: 商品:{product['name']} 特徴:{', '.join(product.get('features', []))} 価格:¥{int(product['price_usd'] * 150)} 要件: - 谦逊な语气(ハumble tone) - 品質重視の表現 - 日本の消費者に響くキーワード - 150-200文字""", "ko_KR": f"""쿠팡 상품 설명을 작성해주세요: 상품: {product['name']} 특징: {', '.join(product.get('features', []))} 가격: ₩{int(product['price_usd'] * 1300)} 요구사항: - 열정적이고 흥미로운 톤 - 한국 소비자에 맞춤화된 표현 - 150-200 단어""", "vi_VN": f"""Viết mô tả sản phẩm cho Shopee Việt Nam: Sản phẩm: {product['name']} Tính năng: {', '.join(product.get('features', []))} Giá: {int(product['price_usd'] * 25000):,} VNĐ Yêu cầu: - Giọng văn thân thiện, gần gũi -突出优势和用户评价 - Từ khóa SEO tiếng Việt - 150-200 từ""" } return locale_prompts.get(locale, locale_prompts["en_US"]) def _get_system_prompt(self, locale: str, config: Dict) -> str: """System prompt theo ngôn ngữ và thị trường""" system_prompts = { "en_US": "You are an expert Amazon US copywriter with 10+ years experience. Write SEO-optimized, persuasive product descriptions.", "de_DE": "Sie sind ein erfahrener deutschsprachiger Produkttexter mit Expertise in Amazon DE-Richtlinien und deutschen Verbraucherpräferenzen.", "ja_JP": "あなたは日本のEC市場のプロフェッショナルコピーライターです。日本の消費者の心を掴む説明文を作成してください。", "ko_KR": "당신은 한국 이커머스 시장의 전문 카피라이터입니다. 한국 소비자에게 공감되는 상품 설명을 작성해주세요.", "vi_VN": "Bạn là chuyên gia viết content cho thị trường thương mại điện tử Việt Nam. Viết mô tả sản phẩm thu hút, dễ hiểu và giàu cảm xúc." } return system_prompts.get(locale, system_prompts["en_US"]) def get_cost_report(self) -> Dict: """Báo cáo chi phí chi tiết""" return { "total_tokens": self.cost_tracker["total_tokens"], "total_cost_usd": round(self.cost_tracker["total_cost_usd"], 2), "cost_breakdown_by_model": { "gpt_4.1": { "tokens": self.cost_tracker["total_tokens"], "rate_per_mtok": 8.00, "cost_usd": round(self.cost_tracker["total_cost_usd"], 2) } }, "savings_vs_openai": round( self.cost_tracker["total_cost_usd"] * 6.5, 2 # So với OpenAI GPT-4o $30/MTok ) }

=== SỬ DỤNG ===

if __name__ == "__main__": # Sample products sample_products = [ { "id": "SKU001", "name": "Wireless Bluetooth Earbuds Pro", "features": ["Active Noise Cancellation", "36h Battery Life", "IPX5 Water Resistant", "Touch Control"], "price_usd": 79.99, "price_eur": 74.99, "category": "Electronics" }, { "id": "SKU002", "name": "Ergonomic Office Chair", "features": ["Lumbar Support", "Adjustable Armrests", "Mesh Back", "360° Swivel"], "price_usd": 299.99, "price_eur": 279.99, "category": "Furniture" } ] client = HolySheepBatchClient(API_KEY) print("🚀 Bắt đầu batch generation...") start_total = time.time() results = client.batch_generate(sample_products, max_workers=5) total_time = time.time() - start_total # Phân tích kết quả success_count = sum(1 for r in results if r["success"]) total_count = len(results) print(f"\n📊 KẾT QUẢ:") print(f" - Tổng requests: {total_count}") print(f" - Thành công: {success_count}") print(f" - Thất bại: {total_count - success_count}") print(f" - Thời gian: {total_time:.2f}s") # Báo cáo chi phí cost_report = client.get_cost_report() print(f"\n💰 CHI PHÍ:") print(f" - Tổng tokens: {cost_report['total_tokens']:,}") print(f" - Tổng chi phí: ${cost_report['total_cost_usd']}") print(f" - Tiết kiệm so với OpenAI: ${cost_report['savings_vs_openai']}") # Hiển thị mẫu kết quả print("\n📝 MẪU KẾT QUẢ (EN_US):") for r in results: if r["success"] and r["locale"] == "en_US": print(f"\n--- {r['market']} ---") print(f"Latency: {r['latency_ms']}ms | Tokens: {r['tokens_used']} | Cost: ${r['cost_usd']}") print(r['content'][:500] + "...")

Retry Logic Và Error Handling Nâng Cao

Trở lại với bài học đắt giá của tôi. Sau nhiều đêm mất ngủ vì các lỗi API, tôi đã xây dựng một hệ thống retry thông minh với exponential backoff. Quan trọng hơn, tôi phát hiện nguyên nhân gốc: rate limiting và context window overflow.

import requests
from requests.adapters import HTTPAdapter
from urllib3.util.retry import Retry
import time
import logging
from dataclasses import dataclass, field
from typing import Optional, Callable
import hashlib

logging.basicConfig(level=logging.INFO)
logger = logging.getLogger(__name__)

@dataclass
class RetryConfig:
    """Cấu hình retry strategy"""
    max_retries: int = 3
    base_delay: float = 1.0  # Giây
    max_delay: float = 60.0  # Giây
    exponential_base: float = 2.0
    retry_on_status: tuple = (408, 429, 500, 502, 503, 504)

@dataclass
class GenerationRequest:
    """Request wrapper với caching và deduplication"""
    product_id: str
    locale: str
    content_hash: str = field(init=False)
    
    def __post_init__(self):
        self.content_hash = hashlib.md5(
            f"{self.product_id}_{self.locale}".encode()
        ).hexdigest()

class HolySheepResilientClient:
    """
    Client có khả năng chịu lỗi cao
    - Exponential backoff
    - Rate limiting tự điều chỉnh
    - Request deduplication
    - Circuit breaker pattern
    """
    
    def __init__(self, api_key: str, retry_config: RetryConfig = None):
        self.api_key = api_key
        self.base_url = BASE_URL
        self.retry_config = retry_config or RetryConfig()
        
        # Session với retry strategy ở HTTP layer
        self.session = requests.Session()
        
        retry_strategy = Retry(
            total=self.retry_config.max_retries,
            backoff_factor=self.retry_config.exponential_base,
            status_forcelist=self.retry_config.retry_on_status,
            allowed_methods=["POST", "GET"]
        )
        
        adapter = HTTPAdapter(max_retries=retry_strategy)
        self.session.mount("https://", adapter)
        self.session.headers.update({
            "Authorization": f"Bearer {api_key}",
            "Content-Type": "application/json"
        })
        
        # Rate limiting state
        self.request_count = 0
        self.window_start = time.time()
        self.rate_limit_window = 60  # 60 giây
        self.max_requests_per_window = 100
        
        # Circuit breaker
        self.failure_count = 0
        self.circuit_open = False
        self.circuit_open_time = None
        self.circuit_timeout = 30  # 30 giây
        
        # Cache cho deduplication
        self.response_cache = {}
        self.cache_enabled = True
    
    def generate_with_retry(self, product: Dict, locale: str) -> Dict:
        """
        Sinh mô tả với retry logic và circuit breaker
        
        Điểm mấu chốt: HolySheep có độ trễ trung bình <50ms,
        nhưng vẫn cần retry logic cho các edge cases
        """
        
        request_id = GenerationRequest(product["id"], locale).content_hash
        
        # Check cache trước
        if self.cache_enabled and request_id in self.response_cache:
            logger.info(f"Cache hit for {product['id']}_{locale}")
            return self.response_cache[request_id]
        
        # Circuit breaker check
        if self._is_circuit_open():
            logger.warning("Circuit breaker is OPEN - using fallback")
            return self._generate_fallback(product, locale)
        
        # Rate limiting check
        self._check_rate_limit()
        
        last_error = None
        
        for attempt in range(self.retry_config.max_retries + 1):
            try:
                result = self._make_request(product, locale)
                
                if result.get("success"):
                    self.failure_count = 0
                    self.response_cache[request_id] = result
                    return result
                
                last_error = result.get("error", "Unknown error")
                
                # Retry cho các lỗi có thể recover
                if "429" in str(last_error) or "rate limit" in str(last_error).lower():
                    wait_time = self._calculate_backoff(attempt)
                    logger.warning(f"Rate limited. Waiting {wait_time}s before retry...")
                    time.sleep(wait_time)
                    continue
                    
            except requests.exceptions.Timeout as e:
                last_error = f"ConnectionError: timeout after 30s - {str(e)}"
                self.failure_count += 1
                
            except requests.exceptions.ConnectionError as e:
                last_error = f"ConnectionError: {str(e)}"
                self.failure_count += 1
                
            except requests.exceptions.HTTPError as e:
                status_code = e.response.status_code
                
                if status_code == 401:
                    # Lỗi xác thực - KHÔNG retry
                    logger.error("401 Unauthorized - Invalid API key")
                    return {
                        "success": False,
                        "error": "401 Unauthorized: Vui lòng kiểm tra API key của bạn",
                        "product_id": product["id"],
                        "locale": locale
                    }
                
                elif status_code == 429:
                    last_error = "429 Too Many Requests"
                    self.failure_count += 1
                    
                elif status_code >= 500:
                    last_error = f"Server error {status_code}"
                    self.failure_count += 1
                else:
                    last_error = str(e)
            
            # Exponential backoff
            if attempt < self.retry_config.max_retries:
                wait_time = self._calculate_backoff(attempt)
                logger.info(f"Retry {attempt + 1}/{self.retry_config.max_retries} after {wait_time}s")
                time.sleep(wait_time)
        
        # Sau tất cả retries thất bại
        self._check_circuit_breaker()
        
        return {
            "success": False,
            "error": f"Failed after {self.retry_config.max_retries + 1} attempts: {last_error}",
            "product_id": product["id"],
            "locale": locale,
            "fallback_used": False
        }
    
    def _make_request(self, product: Dict, locale: str) -> Dict:
        """Thực hiện request đơn lẻ"""
        start = time.time()
        
        response = self.session.post(
            f"{self.base_url}/chat/completions",
            json={
                "model": "gpt-4.1",
                "messages": [
                    {"role": "system", "content": self._get_system_prompt(locale)},
                    {"role": "user", "content": self._build_prompt(product, locale)}
                ],
                "max_tokens": 800,
                "temperature": 0.7
            },
            timeout=30
        )
        
        latency = (time.time() - start) * 1000
        self.request_count += 1
        
        if response.status_code == 200:
            data = response.json()
            return {
                "success": True,
                "content": data["choices"][0]["message"]["content"],
                "tokens_used": data.get("usage", {}).get("total_tokens", 0),
                "latency_ms": round(latency, 2),
                "product_id": product["id"],
                "locale": locale
            }
        else:
            return {
                "success": False,
                "error": f"HTTP {response.status_code}: {response.text}",
                "latency_ms": round(latency, 2),
                "status_code": response.status_code
            }
    
    def _calculate_backoff(self, attempt: int) -> float:
        """Tính toán thời gian chờ exponential backoff"""
        delay = self.retry_config.base_delay * (
            self.retry_config.exponential_base ** attempt
        )
        # Thêm jitter để tránh thundering herd
        import random
        jitter = random.uniform(0, 0.1 * delay)
        return min(delay + jitter, self.retry_config.max_delay)
    
    def _check_rate_limit(self):
        """Kiểm tra và điều chỉnh rate limiting"""
        current_time = time.time()
        
        if current_time - self.window_start >= self.rate_limit_window:
            self.request_count = 0
            self.window_start = current_time
        
        if self.request_count >= self.max_requests_per_window:
            wait_time = self.rate_limit_window - (current_time - self.window_start)
            logger.warning(f"Rate limit reached. Waiting {wait_time:.1f}s...")
            time.sleep(wait_time)
            self.request_count = 0
            self.window_start = time.time()
    
    def _is_circuit_open(self) -> bool:
        """Kiểm tra circuit breaker state"""
        if not self.circuit_open:
            return False
        
        if time.time() - self.circuit_open_time >= self.circuit_timeout:
            logger.info("Circuit breaker half-open - testing...")
            self.circuit_open = False
            return False
        
        return True
    
    def _check_circuit_breaker(self):
        """Cập nhật circuit breaker state"""
        if self.failure_count >= 5:
            logger.error("Circuit breaker OPEN - too many failures")
            self.circuit_open = True
            self.circuit_open_time = time.time()
    
    def _generate_fallback(self, product: Dict, locale: str) -> Dict:
        """Fallback khi circuit breaker mở"""
        return {
            "success": False,
            "error": "Circuit breaker open - service temporarily unavailable",
            "product_id": product["id"],
            "locale": locale,
            "fallback_used": True,
            "fallback_content": self._generate_template_fallback(product, locale)
        }
    
    def _generate_template_fallback(self, product: Dict, locale: str) -> str:
        """Sinh nội dung fallback từ template"""
        templates = {
            "en_US": f"Premium {product['name']} - Shop now! Features: {', '.join(product.get('features', [])[:3])}.",
            "de_DE": f"Hochwertig {product['name']} - Jetzt kaufen! Merkmale: {', '.join(product.get('features', [])[:3])}.",
            "ja_JP": f"高品質{product['name']} - 今すぐ購入!特徴:{', '.join(product.get('features', [])[:3])}",
            "ko_KR": f"프리미엄 {product['name']} - 지금 구매하세요! 특징: {', '.join(product.get('features', [])[:3])}",
            "vi_VN": f"{product['name']} cao cấp - Mua ngay! Tính năng: {', '.join(product.get('features', [])[:3])}."
        }
        return templates.get(locale, templates["en_US"])
    
    def _get_system_prompt(self, locale: str) -> str:
        system_prompts = {
            "en_US": "Expert Amazon US copywriter. Write SEO-optimized, persuasive product descriptions.",
            "de_DE": "Erfahrener Produkttexter für Amazon DE.",
            "ja_JP": "日本のEC市場のプロフェッショナル。",
            "ko_KR": "한국 이커머스 전문가.",
            "vi_VN": "Chuyên gia viết content thương mại điện tử Việt Nam."
        }
        return system_prompts.get(locale, system_prompts["en_US"])
    
    def _build_prompt(self, product: Dict, locale: str) -> str:
        features = product.get('features', [])
        return f"Write a compelling product description for: {product['name']}. Key features: {', '.join(features)}. 150-200 words."
    
    def batch_generate_with_progress(
        self, 
        products: List[Dict], 
        locales: List[str],
        progress_callback: Optional[Callable] = None
    ) -> Dict:
        """
        Batch generation với progress tracking
        
        Args:
            products: Danh sách sản phẩm
            locales: Danh sách ngôn ngữ
            progress_callback: Callback function cho progress updates
        
        Returns:
            Dict chứa kết quả và thống kê
        """
        total_tasks = len(products) * len(locales)
        completed = 0
        results = []
        errors = []
        
        start_time = time.time()
        
        for product in products:
            for locale in locales:
                result = self.generate_with_retry(product, locale)
                
                if result["success"]:
                    results.append(result)
                else:
                    errors.append(result)
                
                completed += 1
                
                if progress_callback:
                    progress_callback(completed, total_tasks, result)
        
        elapsed = time.time() - start_time
        
        return {
            "total_tasks": total_tasks,
            "successful": len(results),
            "failed": len(errors),
            "success_rate": round(len(results) / total_tasks * 100, 2),
            "elapsed_seconds": round(elapsed, 2),
            "avg_latency_ms": round(
                sum(r.get("latency_ms", 0) for r in results) / len(results)
                if results else 0, 2
            ),
            "results": results,
            "errors": errors[:10]  # Chỉ trả về 10 lỗi đầu
        }


=== DEMO VỚI ERROR HANDLING ===

if __name__ == "__main__": print("🧪 Testing HolySheep Resilient Client...") client = HolySheepResilientClient( API_KEY, retry_config=RetryConfig( max_retries=3, base_delay=1.0, max_delay=30.0 ) ) test_products = [ {"id": "TEST001", "name": "Smart Watch Pro", "features": ["Heart Rate", "GPS", "7-Day Battery"]}, {"id": "TEST002", "name": "Laptop Stand", "features": ["Adjustable", "Aluminum", "Foldable"]} ] # Progress callback def on_progress(current, total, result): status = "✅" if result["success"] else "❌" print(f"{status} [{current}/{total}] {result.get('product_id', '?')}_{result.get('locale', '?')}") output = client.batch_generate_with_progress( test_products, ["en_US", "de_DE", "vi_VN"], progress_callback=on_progress ) print(f"\n📊 FINAL RESULTS:") print(f" Success Rate: {output['success_rate']}%") print(f" Avg Latency: {output['avg_latency_ms']}ms") print(f" Total Time: {output['elapsed_seconds']}s")

Template Localization Engine

Ngoài AI generation, tôi phát triển một template engine để đảm bảo tính nhất quán khi AI không khả dụng hoặc cần baseline content trước.

from string import Template
import json
import re
from typing import Dict, List, Optional

class LocalizationTemplateEngine:
    """
    Engine quản lý template đa ngôn ngữ cho e-commerce
    - Variable interpolation
    - Gender/region variants
    - Dynamic content blocks
    """
    
    def __init__(self):
        self.templates = self._load_default_templates()
        self.variables_pattern = re.compile(r'\$\{?(\w+)\}?')
    
    def _load_default_templates(self) -> Dict:
        """Template mặc định cho 5 thị trường"""
        return {
            "en_US": {
                "title": "${product_name} - Premium Quality | ${brand}",
                "short_desc": "⭐ ${rating} (${review_count} reviews) | ${key_feature}",
                "full_desc": Template("""$hook_sentence

About This Product:
$features_list

Why Choose ${product_name}?
$benefits_list

Customer Reviews:
$reviews_summary

📦 Shipping: $shipping_info
🔒 Warranty: $warranty_info

$cta_button"""),
                "specs": Template("""Technical Specifications:
$specs_table"""),
                "cta_button": "🛒 Buy Now - $$price",
                "hook_sentences": [
                    "Transform your daily routine with ${product_name}!",
                    "Discover why thousands trust ${product_name}.",
                    "Premium quality meets exceptional value."
                ]
            },
            
            "de_DE": {
                "title": "${product_name} - Premium Qualität | ${brand}",
                "short_desc": "⭐ ${rating} (${review_count} Bewertungen) | ${key_feature}",
                "full_desc": Template("""$hook_sentence

Über dieses Produkt:
$features_list

Warum ${product_name}?
$benefits_list

Kundenbewertungen:
$reviews_summary

📦 Versand: $shipping_info
🔒 Garantie: $warranty_info

$cta_button"""),
                "specs": Template("""Technische Daten:
$specs_table"""),
                "cta_button": "🛒 Jetzt kaufen - €$price",
                "hook_sentences": [
                    "Verwandeln Sie Ihren Alltag mit ${product_name}!",
                    "Entdecken Sie, warum Tausende ${product_name} vertrauen.",
                    "Premium-Qualität trifft außergewöhnlichen Wert."
                ]
            },
            
            "ja_JP": {
                "title": "${product_name} - 高品質 | ${brand}",
                "short_desc": "⭐ ${rating} (${review_count}件のレビュー) | ${key_feature}",
                "full_desc": Template("""$hook_sentence

商品特徴:
$features_list

なぜ${product_name}を選んだのか?
$benefits_list

お客様の声:
$reviews_summary

📦 配送:$shipping_info
🔒 保証:$warranty_info

$cta_button"""),
                "specs": Template("""产品规格:
$specs_table"""),
                "cta_button": "🛒 今すぐ購入 - ¥$price",
                "hook_sentences": [
                    "${product_name}で毎日の生活をアップグレード!",
                    "Thousands of satisfied customers worldwide.",
                    "優れた品質とコストパフォーマンス"
                ]
            },
            
            "ko_KR": {
                "title": "${product_name} - 프리미엄 품질 | ${brand}",
                "short_desc": "⭐ ${rating} (${review_count}개의 리뷰) | ${key_feature}",
                "full_desc": Template("""$hook_sentence

상품 소개:
$features_list

${product_name}을 선택하는 이유?
$benefits_list

고객 후기:
$reviews_summary

📦 배송