One table across the kinds of module: each registered extractor, cleaner,
segmenter, reader, embedder, protocol and step, with its description, the
call stems it declares, its version and the contract it was registered
under. Ask for one kind to add the columns only that kind has, such
as a reader's signature or an extractor's extensions. The kind's own
listing, such as gr_readers(), keeps its columns and adds version and
contract as its last two.
Value
A data frame with one row per module, sorted by kind in the order
the kinds were registered and by name within a kind: kind, name,
description, and calls, a list column of the call stems each module
declares (character(0) for none). With kind, it also has a column
for each other setting the kind's modules were registered with, except
functions; a setting with more than one value per module, such as an
extractor's extensions, is a list column. The last two columns are
always version and contract (character): the module's version and
the module contract it was registered under with hr_register(), NA
for a module registered through its kind's own function.
See also
hr_register(), vignette("compose"), vignette("extending")
Other harness:
gr_arm(),
gr_condensation_check(),
gr_qa_reference(),
gr_reverse_text(),
gr_scorer_answer(),
hr_arm(),
hr_benchmark(),
hr_chain(),
hr_contrast(),
hr_drift_check(),
hr_effort_check(),
hr_effort_escalate(),
hr_effort_event(),
hr_effort_log(),
hr_mdd(),
hr_reference(),
hr_register(),
hr_report(),
hr_scorer(),
hr_set(),
hr_settings(),
hr_skill(),
hr_step(),
hr_step_command(),
hr_sweep(),
hr_sweep_check()
Examples
m <- hr_modules()
table(m$kind)
#>
#> cleaner embedder extractor protocol reader segmenter
#> 15 3 7 5 14 10
# One kind, with that kind's own columns.
r <- hr_modules("reader")
r[r$name %in% c("stuff", "retrieve"), c("name", "signature", "cost_calls")]
#> name signature cost_calls
#> 11 retrieve topk|1|none 1 + embeddings
#> 14 stuff all|1|none 1
r$calls[r$name == "refine"][[1]]
#> [1] "refine.draft" "refine.revise" "refine.answer"