Web search and fetch functionality for Ollama cloud API.
These functions require an Ollama API key when calling the hosted API.
Set the OLLAMA_API_KEY environment variable or pass authorization headers
when initializing the client.
Summary
Functions
Fetch and extract content from a URL.
Fetch content, raising on error.
Search the web using Ollama's cloud search API.
Search the web, raising on error.
Types
@type search_opts() :: [ query: String.t(), max_results: pos_integer(), base_url: String.t() ]
Functions
@spec fetch(Ollixir.client(), fetch_opts()) :: {:ok, Ollixir.Web.FetchResponse.t()} | {:error, term()}
Fetch and extract content from a URL.
@spec fetch!(Ollixir.client(), fetch_opts()) :: Ollixir.Web.FetchResponse.t()
Fetch content, raising on error.
@spec search(Ollixir.client(), search_opts()) :: {:ok, Ollixir.Web.SearchResponse.t()} | {:error, term()}
Search the web using Ollama's cloud search API.
@spec search!(Ollixir.client(), search_opts()) :: Ollixir.Web.SearchResponse.t()
Search the web, raising on error.