start_pull_job: Start a background pull for an Ollama model

View source: R/async_pull.R

start_pull_jobR Documentation

Start a background pull for an Ollama model

Description

Spawns a callr::r_bg subprocess that streams progress from Ollama's ⁠/api/pull⁠ endpoint into a progress file. The caller can poll pull_job_status(model) for updates and pull_job_cancel(handle) to abort.

Usage

start_pull_job(model, ollama_url = getOption("screenllm.ollama_url"))

Arguments

model

Ollama model tag (e.g. "mistral:7b").

ollama_url

Base URL of the Ollama server.

Details

Idempotent per-model within one R session: if a pull is already running for model, returns the existing handle instead of launching another.

Value

A list with model, pid, handle, and progress_path.


screenllm documentation built on Sept. 24, 2026, 5:11 p.m.