incorporate external context from DDG

This commit is contained in:
2025-05-04 09:07:45 +10:00
parent 427a5cb919
commit e5ebd000fe
4 changed files with 79 additions and 37 deletions
+4 -4
View File
@@ -612,10 +612,10 @@ def insert_link_naturally(summary, source_name, source_url):
target_para = random.choice([p for p in paragraphs if p.strip()])
link_pattern = f'<a href="{source_url}">{source_name}</a>'
phrases = [
f"Learn more from {link_pattern}",
f"{link_pattern} shares this insight",
f"Discover more at {link_pattern}",
f"Check out {link_pattern} for details"
f"According to {link_pattern}", # Changed to a more neutral phrasing
f"{link_pattern} notes this insight", # Adjusted phrasing
f"Details shared by {link_pattern}", # Adjusted phrasing
f"Source: {link_pattern}" # Simple attribution
]
insertion_phrase = random.choice(phrases)