Vibe.Plugins.WebSearch (vibe v0.2.2)

Copy Markdown View Source

Web search plugin and provider-neutral eval API exposed as Web.

Summary

Functions

Fetches a URL through the configured fetch provider.

Raises on URL fetch errors.

Filters search results to URLs containing a domain substring.

Parses HTML from a fetch result or binary string with Floki.

Parses HTML from a fetch result or binary string with Floki, raising on failure.

Searches the web through the configured search provider.

Raises on web search errors.

Extracts matching HTML from a fetched page with a CSS selector.

Extracts matching HTML from a fetched page with a CSS selector, raising on failure.

Keeps at most count search results.

Truncates fetched content or plain text using the shared tool-output byte limit.

Types

fetch_result()

@type fetch_result() :: Vibe.Plugins.WebSearch.FetchResult.t()

search_result()

@type search_result() :: Vibe.Plugins.WebSearch.SearchResult.t()

Functions

fetch(url, opts \\ [])

@spec fetch(
  String.t(),
  keyword()
) :: {:ok, Vibe.Plugins.WebSearch.FetchResult.t()} | {:error, term()}

Fetches a URL through the configured fetch provider.

fetch!(url, opts \\ [])

Raises on URL fetch errors.

filter_domain(search, domain)

Filters search results to URLs containing a domain substring.

parse_html(value)

Parses HTML from a fetch result or binary string with Floki.

parse_html!(value)

Parses HTML from a fetch result or binary string with Floki, raising on failure.

search(query, opts \\ [])

@spec search(
  String.t(),
  keyword()
) :: {:ok, Vibe.Plugins.WebSearch.SearchResult.t()} | {:error, term()}

Searches the web through the configured search provider.

search!(query, opts \\ [])

Raises on web search errors.

select(result, selector)

Extracts matching HTML from a fetched page with a CSS selector.

select!(result, selector)

Extracts matching HTML from a fetched page with a CSS selector, raising on failure.

take(search, count)

Keeps at most count search results.

truncate(value, opts \\ [])

Truncates fetched content or plain text using the shared tool-output byte limit.