Skip to contents

Searches Meta AI, which provides general-purpose AI assistance with a focus on conversational responses.

Usage

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

Arguments

query

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

prompt

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

Value

The generated search URL or an empty string.

See also

Examples

# Basic query
ask_meta_ai("What are the best R packages for visualization?")
#> Please type into your browser:
#> https://www.meta.ai/?q=What%20are%20the%20best%20R%20packages%20for%20visualization?

# Using a custom prompt
ask_meta_ai("How to create a heatmap in R",
            prompt = "Compare ggplot2 and base R approaches:")
#> Using prompts: function call
#> Please type into your browser:
#> https://www.meta.ai/?q=Compare%20ggplot2%20and%20base%20R%20approaches:%20How%20to%20create%20a%20heatmap%20in%20R