Builtin Library
README.md
describe (service)
Writes the descriptions assets are missing: the text a type asks its assets
to carry (a README, or the about.yaml texts, for the built-in types that ask). One call takes many assets. It
reads the instruction and the assets' files it is handed and answers for each
asset, in a reply that is written to the path the caller directs. The
services describe tool is how it is used: it works out what each asset needs,
packs the assets into as few calls as fit, and writes each answer into its
asset's description file.
Operation
One operation, complete, calling the complete endpoint of the
origozero/describe offering. A call costs 1 credit, whatever it carries. It
takes two inputs, instructions and content, and runs a model on the
OpenRouter account the offering meters.
content holds the assets, each in a block that carries an id, and the model
answers one JSON object per line, keyed by those ids. The answer-format.md file
in the tool's module states the format. How many assets a call carries is the caller's to set,
and services describe keeps each request inside 384 KiB.
Using it
local describe = asset.resolve("describe", "service")
local g = describe:invoke({
instructions = guideText,
content = blocksText,
asset_path = "/zero/source/tmp/describe/1.txt",
})
The reply is the file at asset_path once the run reads completed. Splitting
the assets into calls, reading each answer and writing the text where it belongs
is what services describe does.