# Helper formatting functions def format_local_map(result): html = ( f"
Local Map:
" f"View on Google Maps
" f"
" ) return html def format_knowledge(result): html = ( f"
{result.get('title','Unknown')}
" f"Type: {result.get('type','')}
" f"Born: {result.get('born','')}
" f"Died: {result.get('died','')}
" ) return html def format_images(result): # Extract 'original' URL from each image dict. urls = [item.get("original", "") for item in result] return urls def format_videos(result): html = "
" for vid in result: html += ( f"
" f"
" f"{vid.get('title','')}" f"
" ) html += "
" return html def format_links(result): html = "
" return html