feat(google-ads): Add 'Special Instructions' support - Users can now provide custom preferences (tone, focus, etc.) for AI generation - Added 'Special Instructions' field to Google Ads Generator UI (below Target Audience) - Localized labels and placeholders in English, Russian, and Hebrew - Integrated instructions into AI prompts across Ollama, Qwen, and Z.AI providers
This commit is contained in:
@@ -47,6 +47,8 @@ export const translations = {
|
||||
budget: "Budget (USD/mo)",
|
||||
industry: "Industry",
|
||||
targetAudience: "Target Audience",
|
||||
specialInstructions: "Special Instructions",
|
||||
specialInstructionsPlaceholder: "Any special preferences or instructions for AI to consider (e.g. 'Use a humorous tone', 'Focus on seasonal discounts')...",
|
||||
generateAds: "Generate Ads",
|
||||
magicWand: "Magic Wand",
|
||||
researching: "Researching...",
|
||||
@@ -169,6 +171,8 @@ export const translations = {
|
||||
budget: "Бюджет (USD/мес)",
|
||||
industry: "Отрасль",
|
||||
targetAudience: "Целевая аудитория",
|
||||
specialInstructions: "Особые инструкции",
|
||||
specialInstructionsPlaceholder: "Любые особые предпочтения или инструкции для ИИ (например, 'Используйте юмористический тон', 'Сосредоточьтесь на сезонных скидках')...",
|
||||
generateAds: "Создать рекламу",
|
||||
magicWand: "Магический жезл",
|
||||
researching: "Исследование...",
|
||||
@@ -291,6 +295,8 @@ export const translations = {
|
||||
budget: "תקציב (USD לחודש)",
|
||||
industry: "תעשייה",
|
||||
targetAudience: "קהל יעד",
|
||||
specialInstructions: "הוראות מיוחדות",
|
||||
specialInstructionsPlaceholder: "כל העדפה או הוראה מיוחדת עבור ה-AI (למשל: 'השתמש בטון הומוריסטי', 'התמקד בהנחות עונתיות')...",
|
||||
generateAds: "חולל מודעות",
|
||||
magicWand: "מטה קסמים",
|
||||
researching: "חוקר...",
|
||||
|
||||
@@ -217,6 +217,7 @@ export class ModelAdapter {
|
||||
industry?: string;
|
||||
competitors?: string[];
|
||||
language?: string;
|
||||
specialInstructions?: string;
|
||||
} = { productsServices: [] },
|
||||
provider?: ModelProvider,
|
||||
model?: string
|
||||
@@ -230,12 +231,13 @@ export class ModelAdapter {
|
||||
websiteUrl: string,
|
||||
product: string,
|
||||
budget: number,
|
||||
specialInstructions?: string,
|
||||
provider?: ModelProvider,
|
||||
model?: string
|
||||
): Promise<APIResponse<string>> {
|
||||
const fallback = this.buildFallbackProviders(this.preferredProvider, "qwen", "ollama", "zai");
|
||||
const providers: ModelProvider[] = provider ? [provider] : fallback;
|
||||
return this.callWithFallback((service) => service.generateMagicWand(websiteUrl, product, budget, model), providers);
|
||||
return this.callWithFallback((service) => service.generateMagicWand(websiteUrl, product, budget, specialInstructions, model), providers);
|
||||
}
|
||||
|
||||
|
||||
|
||||
@@ -445,6 +445,7 @@ Generate SPECTACULAR slides with CSS3 animations, SVG charts, modern gradients,
|
||||
industry?: string;
|
||||
competitors?: string[];
|
||||
language?: string;
|
||||
specialInstructions?: string;
|
||||
} = { productsServices: [] },
|
||||
model?: string
|
||||
): Promise<APIResponse<string>> {
|
||||
@@ -455,7 +456,8 @@ Generate SPECTACULAR slides with CSS3 animations, SVG charts, modern gradients,
|
||||
campaignDuration,
|
||||
industry = "General",
|
||||
competitors = [],
|
||||
language = "English"
|
||||
language = "English",
|
||||
specialInstructions = ""
|
||||
} = options;
|
||||
|
||||
const systemMessage: ChatMessage = {
|
||||
@@ -520,6 +522,7 @@ LANGUAGE: ${language}
|
||||
${budgetRange ? `BUDGET: ${budgetRange.min}-${budgetRange.max} ${budgetRange.currency}/month` : ""}
|
||||
${campaignDuration ? `DURATION: ${campaignDuration}` : ""}
|
||||
${competitors.length > 0 ? `COMPETITORS: ${competitors.join(", ")}` : ""}
|
||||
${specialInstructions ? `SPECIAL INSTRUCTIONS: ${specialInstructions}` : ""}
|
||||
|
||||
Generate complete Google Ads package with keywords, ad copy, campaigns, and implementation guidance.`,
|
||||
};
|
||||
@@ -531,6 +534,7 @@ Generate complete Google Ads package with keywords, ad copy, campaigns, and impl
|
||||
websiteUrl: string,
|
||||
product: string,
|
||||
budget: number,
|
||||
specialInstructions?: string,
|
||||
model?: string
|
||||
): Promise<APIResponse<string>> {
|
||||
const systemMessage: ChatMessage = {
|
||||
@@ -595,6 +599,7 @@ CRITICAL REQUIREMENTS:
|
||||
WEBSITE: ${websiteUrl}
|
||||
PRODUCT/SERVICE: ${product}
|
||||
MONTHLY BUDGET: $${budget}
|
||||
${specialInstructions ? `SPECIAL INSTRUCTIONS: ${specialInstructions}` : ""}
|
||||
|
||||
Perform a DEEP 360° competitive intelligence analysis and generate 5-7 strategic campaign directions.`,
|
||||
};
|
||||
|
||||
@@ -772,6 +772,7 @@ Generate SPECTACULAR slides with CSS3 animations, SVG charts, modern gradients,
|
||||
industry?: string;
|
||||
competitors?: string[];
|
||||
language?: string;
|
||||
specialInstructions?: string;
|
||||
} = { productsServices: [] },
|
||||
model?: string
|
||||
): Promise<APIResponse<string>> {
|
||||
@@ -782,7 +783,8 @@ Generate SPECTACULAR slides with CSS3 animations, SVG charts, modern gradients,
|
||||
campaignDuration,
|
||||
industry = "General",
|
||||
competitors = [],
|
||||
language = "English"
|
||||
language = "English",
|
||||
specialInstructions = ""
|
||||
} = options;
|
||||
|
||||
const systemMessage: ChatMessage = {
|
||||
@@ -847,6 +849,7 @@ LANGUAGE: ${language}
|
||||
${budgetRange ? `BUDGET: ${budgetRange.min}-${budgetRange.max} ${budgetRange.currency}/month` : ""}
|
||||
${campaignDuration ? `DURATION: ${campaignDuration}` : ""}
|
||||
${competitors.length > 0 ? `COMPETITORS: ${competitors.join(", ")}` : ""}
|
||||
${specialInstructions ? `SPECIAL INSTRUCTIONS: ${specialInstructions}` : ""}
|
||||
|
||||
Generate complete Google Ads package with keywords, ad copy, campaigns, and implementation guidance.`,
|
||||
};
|
||||
@@ -858,6 +861,7 @@ Generate complete Google Ads package with keywords, ad copy, campaigns, and impl
|
||||
websiteUrl: string,
|
||||
product: string,
|
||||
budget: number,
|
||||
specialInstructions?: string,
|
||||
model?: string
|
||||
): Promise<APIResponse<string>> {
|
||||
const systemMessage: ChatMessage = {
|
||||
@@ -922,6 +926,7 @@ CRITICAL REQUIREMENTS:
|
||||
WEBSITE: ${websiteUrl}
|
||||
PRODUCT/SERVICE: ${product}
|
||||
MONTHLY BUDGET: $${budget}
|
||||
${specialInstructions ? `SPECIAL INSTRUCTIONS: ${specialInstructions}` : ""}
|
||||
|
||||
Perform a DEEP 360° competitive intelligence analysis and generate 5-7 strategic campaign directions.`,
|
||||
};
|
||||
|
||||
@@ -418,6 +418,7 @@ Return the complete JSON with full htmlContent for each slide. Make each slide V
|
||||
industry?: string;
|
||||
competitors?: string[];
|
||||
language?: string;
|
||||
specialInstructions?: string;
|
||||
} = { productsServices: [] },
|
||||
model?: string
|
||||
): Promise<APIResponse<string>> {
|
||||
@@ -428,7 +429,8 @@ Return the complete JSON with full htmlContent for each slide. Make each slide V
|
||||
campaignDuration,
|
||||
industry = "General",
|
||||
competitors = [],
|
||||
language = "English"
|
||||
language = "English",
|
||||
specialInstructions = ""
|
||||
} = options;
|
||||
|
||||
const systemMessage: ChatMessage = {
|
||||
@@ -592,6 +594,7 @@ LANGUAGE: ${language}
|
||||
${budgetRange ? `BUDGET: ${budgetRange.min}-${budgetRange.max} ${budgetRange.currency}/month` : ""}
|
||||
${campaignDuration ? `DURATION: ${campaignDuration}` : ""}
|
||||
${competitors.length > 0 ? `COMPETITORS: ${competitors.join(", ")}` : ""}
|
||||
${specialInstructions ? `SPECIAL INSTRUCTIONS: ${specialInstructions}` : ""}
|
||||
|
||||
Generate a COMPLETE Google Ads package including:
|
||||
🔍 Comprehensive keyword research (primary, long-tail, negative)
|
||||
@@ -610,6 +613,7 @@ Make this campaign READY TO LAUNCH with copy-paste ready content!`,
|
||||
websiteUrl: string,
|
||||
product: string,
|
||||
budget: number,
|
||||
specialInstructions?: string,
|
||||
model?: string
|
||||
): Promise<APIResponse<string>> {
|
||||
const systemMessage: ChatMessage = {
|
||||
@@ -676,6 +680,7 @@ CRITICAL REQUIREMENTS:
|
||||
WEBSITE: ${websiteUrl}
|
||||
PRODUCT/SERVICE: ${product}
|
||||
MONTHLY BUDGET: $${budget}
|
||||
${specialInstructions ? `SPECIAL INSTRUCTIONS: ${specialInstructions}` : ""}
|
||||
|
||||
MISSION: Perform a DEEP 360° competitive intelligence analysis and generate 5-7 strategic campaign directions that will DOMINATE this market.`,
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user