Skip to main content

render_chain

Function render_chain 

Source
pub fn render_chain(choices: &[Choice]) -> String
Expand description

Render the whole drep.toml, comments included, for a failover chain.

Produces exactly the shape crate::config::load accepts: one [[llm]] table per choice in order, the keys in the order they appear in the file (the TOML document parser preserves order; serde reads them positionally), and each optional line only when the choice calls for it.

The order is the chain: entry one is tried first and each later entry is a fallback for the one before it.