generate_marketing_text.py aktualisiert
This commit is contained in:
@@ -13,7 +13,7 @@ from config import Config
|
||||
# --- Konfiguration ---
|
||||
KNOWLEDGE_BASE_FILE = "marketing_wissen.yaml"
|
||||
OUTPUT_FILE = "marketing_text_blocks.xlsx" # Excel ist besser für lange Texte
|
||||
MODEL_TO_USE = "gpt-4o"
|
||||
MODEL_TO_USE = "gpt-4o" # Das neueste und beste Modell für diese Aufgabe
|
||||
|
||||
# --- Logging einrichten ---
|
||||
logging.basicConfig(level=logging.INFO, format='%(asctime)s - %(levelname)s - %(message)s')
|
||||
@@ -103,6 +103,7 @@ def main(specific_branch=None):
|
||||
target_branches = {specific_branch: target_branches[specific_branch]}
|
||||
else:
|
||||
logging.error(f"FEHLER: Die angegebene Branche '{specific_branch}' wurde in der Wissensbasis nicht gefunden.")
|
||||
logging.info(f"Verfügbare Branchen sind: {list(knowledge_base.get('Branchen', {}).keys())}")
|
||||
return
|
||||
|
||||
positions = knowledge_base.get('Positionen', {})
|
||||
@@ -134,9 +135,8 @@ def main(specific_branch=None):
|
||||
'Introduction_Textonly': 'FEHLER: KI-Antwort war ungültig',
|
||||
'Industry References (Text only)': branch_data.get('references_DE', '')
|
||||
})
|
||||
time.sleep(2) # Pause zur Schonung der API
|
||||
time.sleep(2)
|
||||
|
||||
# Ergebnisse in eine Excel-Datei schreiben
|
||||
if results:
|
||||
df = pd.DataFrame(results)
|
||||
df.to_excel(OUTPUT_FILE, index=False)
|
||||
|
||||
Reference in New Issue
Block a user