@@ -65,8 +65,8 @@ ai_searcher = function(site) {
6565# ' This function allows you to ask questions, get code help,
6666# ' or search for information using ChatGPT.
6767# '
68- # ' @param query Contents of string to send to ChatGPT . Default is the last error message.
69- # ' @param prompt Optional prompt prefix to add before your query to guide how ChatGPT
68+ # ' @param query Contents of string to send to AI Service . Default is the last error message.
69+ # ' @param prompt Optional prompt prefix to add before your query to guide how the AI Service
7070# ' responds. If NULL, uses the service-specific default prompt option.
7171# '
7272# ' @return The generated search URL or an empty string.
@@ -173,6 +173,25 @@ ask_bing_copilot = ai_searcher("copilot")
173173# ' @export
174174ask_copilot = ask_bing_copilot
175175
176+ # ' Search with Grok
177+ # '
178+ # ' Searches xAI's Grok, which provides AI assistance focused on
179+ # ' maximize truth and objectivity.
180+ # '
181+ # ' @inheritParams ask_chatgpt
182+ # ' @return The generated search URL or an empty string.
183+ # '
184+ # ' @export
185+ # ' @family AI assistants
186+ # ' @examples
187+ # ' # Basic query
188+ # ' ask_grok("What are the best practices for R package development?")
189+ # '
190+ # ' # Using a custom prompt
191+ # ' ask_grok("How to optimize this R code for performance?",
192+ # ' prompt = "Focus on efficiency and best practices:")
193+ ask_grok = ai_searcher(" grok" )
194+
176195# ' Search with Meta AI
177196# '
178197# ' Searches Meta AI, which provides general-purpose AI assistance
0 commit comments