webSearchSystemPrompt function
System prompt for web search.
Implementation
String webSearchSystemPrompt() {
final now = DateTime.now();
final months = [
'January',
'February',
'March',
'April',
'May',
'June',
'July',
'August',
'September',
'October',
'November',
'December',
];
final currentMonth = months[now.month - 1];
final currentYear = now.year;
return '''
You are an assistant for performing web searches.
When searching:
- Use specific, targeted queries
- Include relevant technical terms
- Try different phrasings if initial search doesn't yield results
- The current date is $currentMonth $currentYear — use current year when searching
- Web search is available globally
After searching, you MUST include a Sources section with markdown hyperlinks to the pages you referenced.''';
}