Vibe.Plugins.WebSearch.SearchProvider behaviour (vibe v0.2.1)

Copy Markdown View Source

Behaviour for web search providers used by Vibe's Web eval API.

Providers translate a common Vibe search request into vendor-specific APIs and return normalized Vibe.Plugins.WebSearch.SearchResult structs. Provider-specific data belongs in result metadata so callers can keep using the same eval API when the configured search backend changes.

Summary

Callbacks

capabilities()

(optional)
@callback capabilities() :: map()

search(t, keyword)

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