ai_searcher: Searcher Function Generator for AI Services

View source: R/ai-search-functions.R

ai_searcherR Documentation

Searcher Function Generator for AI Services

Description

Creates a search function specifically for interacting with AI services. Unlike regular search functions, AI searchers support custom prompts that can guide how the AI responds to queries.

Usage

ai_searcher(site)

Arguments

site

Name of the site to search on (e.g., "chatgpt", "claude")

Details

The returned function will apply prompts in the following priority order:

  1. System-level prompt set via ai_prompt() (if any)

  2. Function call prompt or service-specific option

  3. The query itself

The returned function accepts two parameters:

  • query: The question or request to send to the AI (defaults to last error message)

  • prompt: Custom prompt to guide the AI's response (optional)

Value

A function that can be used to search the specified AI service with optional prompt customization


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