feat(b2b): Add batch processing, industry selection, optimized PDF export, and update docs
This commit is contained in:
@@ -127,16 +127,16 @@ Fuehre nun **Schritt 6 - Marketingbotschaft (WIE sprechen)** durch.
|
||||
|
||||
# Anweisungen fuer Schritt 6: Chain-of-Thought-Analyse & Texterstellung
|
||||
|
||||
**FOKUS:** Um die Analyse handhabbar zu machen, waehle aus Schritt 2 die **eine (1) relevanteste und vielversprechendste Zielbranche** (Primary Industry) aus.
|
||||
Dein Ziel ist es, NUR fuer diese EINE Fokus-Branche eine spezifische Botschaft fuer JEDE Rolle aus Schritt 3 zu erstellen.
|
||||
**FOKUS:** Erstelle die Botschaften **AUSSCHLIESSLICH** fuer die vorgegebene **Fokus-Branche: {{focus_industry}}**.
|
||||
Ignoriere alle anderen Branchen. Dein Ziel ist es, fuer JEDE Rolle innerhalb dieser EINEN Branche eine spezifische Botschaft zu entwickeln.
|
||||
|
||||
Fuehre fuer jede **[Rolle]** innerhalb der ausgewaehlten **[Fokus-Branche]** den folgenden Denkprozess durch:
|
||||
Fuehre fuer jede **[Rolle]** innerhalb der **[Fokus-Branche: {{focus_industry}}]** den folgenden Denkprozess durch:
|
||||
|
||||
1. **Schritt 6.1 (Analyse): Produkt-Rollen-Fit.**
|
||||
* Welches Produkt/welche Loesung aus der "Angebot"-Tabelle (Schritt 1) ist fuer die **[Rolle]** am relevantesten?
|
||||
|
||||
2. **Schritt 6.2 (Analyse): Branchen-Use-Case.**
|
||||
* Was sind 1-2 typische Anwendungsfaelle fuer das ausgewaehlte Produkt in der **[Fokus-Branche]**? Was macht die **[Rolle]** damit konkret?
|
||||
* Was sind 1-2 typische Anwendungsfaelle fuer das ausgewaehlte Produkt in der **{{focus_industry}}**? Was macht die **[Rolle]** damit konkret?
|
||||
|
||||
3. **Schritt 6.3 (Analyse): Nutzen-Quantifizierung.**
|
||||
* Betrachte die Painpoints (Schritt 4) und Gains (Schritt 5) fuer die **[Rolle]**.
|
||||
@@ -234,10 +234,10 @@ Now perform **Step 6 - Marketing Message (HOW to speak)**.
|
||||
|
||||
# Instructions for Step 6: Chain-of-Thought Analysis & Copywriting
|
||||
|
||||
**FOCUS:** To make the analysis manageable, select the **one (1) most relevant and promising target industry** (Primary Industry) from Step 2.
|
||||
Your goal is to create a specific message for EACH role from Step 3 ONLY for this ONE focus industry.
|
||||
**FOCUS:** Create messages **EXCLUSIVELY** for the provided **Focus Industry: {{focus_industry}}**.
|
||||
Ignore all other industries. Your goal is to create a specific message for EACH role within this ONE industry.
|
||||
|
||||
For each **[Role]** within the selected **[Focus Industry]**, perform the following thought process:
|
||||
For each **[Role]** within the **[Focus Industry: {{focus_industry}}]**, perform the following thought process:
|
||||
|
||||
1. **Step 6.1 (Analysis): Product-Role Fit.**
|
||||
* Which product/solution from the "Offer" table (Step 1) is most relevant for the **[Role]**?
|
||||
@@ -496,7 +496,7 @@ def start_generation(url, language, regions, focus):
|
||||
"offer": {"summary": current_prompts['SUMMARY_TEXT_FOR_STEP1'], "headers": table_data['headers'], "rows": table_data['rows']}
|
||||
}
|
||||
|
||||
def next_step(language, context_file, generation_step, channels):
|
||||
def next_step(language, context_file, generation_step, channels, focus_industry=None):
|
||||
logging.info(f"Starting Step {generation_step} in language: {language}")
|
||||
api_key = load_api_key()
|
||||
if not api_key: raise ValueError("Gemini API key is missing.")
|
||||
@@ -507,6 +507,11 @@ def next_step(language, context_file, generation_step, channels):
|
||||
previous_steps_markdown = format_context_for_prompt(analysis_data, language)
|
||||
prompt = step_prompt_template.replace('{{previous_steps_data}}', previous_steps_markdown)
|
||||
if '{{channels}}' in prompt: prompt = prompt.replace('{{channels}}', channels or 'LinkedIn, Kaltmail, Landingpage')
|
||||
|
||||
# Inject focus industry if provided (for Step 6)
|
||||
if '{{focus_industry}}' in prompt:
|
||||
prompt = prompt.replace('{{focus_industry}}', focus_industry or 'Primary Industry')
|
||||
|
||||
initial_inputs = analysis_data.get('_initial_inputs', {})
|
||||
|
||||
# Helper to safely get string values even if they are None/null in the JSON
|
||||
@@ -546,10 +551,11 @@ def main():
|
||||
parser.add_argument('--generation_step', type=int)
|
||||
parser.add_argument('--channels')
|
||||
parser.add_argument('--language', required=True)
|
||||
parser.add_argument('--focus_industry') # New argument
|
||||
args = parser.parse_args()
|
||||
try:
|
||||
if args.mode == 'start_generation': result = start_generation(args.url, args.language, args.regions, args.focus)
|
||||
elif args.mode == 'next_step': result = next_step(args.language, args.context_file, args.generation_step, args.channels)
|
||||
elif args.mode == 'next_step': result = next_step(args.language, args.context_file, args.generation_step, args.channels, args.focus_industry)
|
||||
sys.stdout.write(json.dumps(result, ensure_ascii=False))
|
||||
except Exception as e:
|
||||
logging.error(f"Error: {e}", exc_info=True)
|
||||
|
||||
Reference in New Issue
Block a user