ask_grok: Search with Grok

ask_grokR Documentation

Search with Grok

Description

Searches xAI's Grok, which provides AI assistance focused on maximize truth and objectivity.

Usage

ask_grok(query = geterrmessage(), prompt = NULL)

ask_xai(query = geterrmessage(), prompt = NULL)

Arguments

query

Contents of string to send to AI Service. Default is the last error message.

prompt

Optional prompt prefix to add before your query to guide how the AI Service responds. If NULL, uses the service-specific default prompt option.

Value

The generated search URL or an empty string.

See Also

Other AI assistants: ask_bing_copilot(), ask_chatgpt(), ask_claude(), ask_meta_ai(), ask_mistral(), ask_perplexity()

Examples

# Basic query
ask_grok("What are the best practices for R package development?")

# Using a custom prompt
ask_grok("How to optimize this R code for performance?",
                 prompt = "Focus on efficiency and best practices:")

coatless/searcher documentation built on June 2, 2025, 10:37 a.m.