cwadayi commited on
Commit
a1bc869
Β·
verified Β·
1 Parent(s): 7fa4021

Upload 16 files

Browse files
Files changed (1) hide show
  1. core/callbacks.py +2 -3
core/callbacks.py CHANGED
@@ -52,14 +52,13 @@ def execute_user_code(code_string, source_lab):
52
  notification_text += f"\n錯θͺ€ι‘žεž‹: {error_type}"
53
  send_line_notification_in_background(notification_text)
54
 
55
- # --- ✨ UPDATED: Added specific keywords for direct tool invocation ---
56
  LIVE_TOOLS = [
57
  {"keywords": ["ζ–°θž", "今ζ—₯ζ–°θž", "news"], "function": news_service.fetch_today_news, "name": "今ζ—₯ζ–°θž"},
58
  {"keywords": ["cwaεœ°ιœ‡", "ι‘―θ‘—εœ°ιœ‡", "ζœ‰ζ„Ÿεœ°ιœ‡"], "function": cwa_service.fetch_significant_earthquakes, "name": "CWA ι‘―θ‘—ζœ‰ζ„Ÿεœ°ιœ‡"},
59
  {"keywords": ["εœ°ιœ‡ι θ­¦", "cwa alarm"], "function": cwa_service.fetch_cwa_alarm_list, "name": "CWA εœ°ιœ‡ι θ­¦"},
60
- {"keywords": ["ε…¨ηƒεœ°ιœ‡", "usgs"], "function": usgs_service.fetch_global_last24h_text, "name": "ε…¨ηƒι‘―θ‘—εœ°ιœ‡"},
 
61
  {"keywords": ["pwsη™ΌεΈƒ", "pws info"], "function": pws_service.fetch_latest_pws_info, "name": "PWS η™ΌεΈƒζƒ…ε½’"},
62
- # --- ✨ εœ¨ι€™θ£‘ζ–°ε’žδΊ† "pws" ε’Œ "ζœ€ζ–°ηš„ pws εœ°ιœ‡θ­¦ε ±" ---
63
  {"keywords": ["pwsεœ°ιœ‡", "pws alert", "pws", "ζœ€ζ–°ηš„ pws εœ°ιœ‡θ­¦ε ±"], "function": pws_service.fetch_cwa_pws_earthquake_info, "name": "PWS εœ°ιœ‡θ­¦ε ±"},
64
  ]
65
 
 
52
  notification_text += f"\n錯θͺ€ι‘žεž‹: {error_type}"
53
  send_line_notification_in_background(notification_text)
54
 
 
55
  LIVE_TOOLS = [
56
  {"keywords": ["ζ–°θž", "今ζ—₯ζ–°θž", "news"], "function": news_service.fetch_today_news, "name": "今ζ—₯ζ–°θž"},
57
  {"keywords": ["cwaεœ°ιœ‡", "ι‘―θ‘—εœ°ιœ‡", "ζœ‰ζ„Ÿεœ°ιœ‡"], "function": cwa_service.fetch_significant_earthquakes, "name": "CWA ι‘―θ‘—ζœ‰ζ„Ÿεœ°ιœ‡"},
58
  {"keywords": ["εœ°ιœ‡ι θ­¦", "cwa alarm"], "function": cwa_service.fetch_cwa_alarm_list, "name": "CWA εœ°ιœ‡ι θ­¦"},
59
+ # --- ✨ εœ¨ι€™θ£‘ζ–°ε’žδΊ† "usgs" ε’Œ "ζœ€θΏ‘ε…¨ηƒζœ‰ε“ͺδΊ›ε€§εœ°ιœ‡" ---
60
+ {"keywords": ["ε…¨ηƒεœ°ιœ‡", "usgs", "ζœ€θΏ‘ε…¨ηƒζœ‰ε“ͺδΊ›ε€§εœ°ιœ‡"], "function": usgs_service.fetch_global_last24h_text, "name": "ε…¨ηƒι‘―θ‘—εœ°ιœ‡"},
61
  {"keywords": ["pwsη™ΌεΈƒ", "pws info"], "function": pws_service.fetch_latest_pws_info, "name": "PWS η™ΌεΈƒζƒ…ε½’"},
 
62
  {"keywords": ["pwsεœ°ιœ‡", "pws alert", "pws", "ζœ€ζ–°ηš„ pws εœ°ιœ‡θ­¦ε ±"], "function": pws_service.fetch_cwa_pws_earthquake_info, "name": "PWS εœ°ιœ‡θ­¦ε ±"},
63
  ]
64