fix: onboarding passes product_info dict; marketing service template fallback when no AI; frontend style-switching tabs

This commit is contained in:
TradeMate Dev
2026-05-14 19:23:45 +08:00
parent 93f6ad306a
commit 566f59f0e4
3 changed files with 128 additions and 12 deletions
+3 -4
View File
@@ -35,11 +35,10 @@ class OnboardingService:
await self.db.flush()
mkt = MarketingService()
product_info = {"name": name, "description": description, "category": category or "general"}
try:
content = await mkt.generate(
product_name=name,
description=description,
category=category or "general",
product_info=product_info,
target=target,
style="professional",
count=3,
@@ -51,7 +50,7 @@ class OnboardingService:
try:
keywords_result = await mkt.generate_keywords(
product_name=name, description=description, category=category or "general"
product_info=product_info
)
keywords = keywords_result if isinstance(keywords_result, list) else []
except Exception as e: