Skip to main content

run

Function run 

Source
pub async fn run(
    llm: &LlmConfig,
    url: &str,
    raw: &str,
) -> Result<(String, Vec<String>)>
Expand description

Run the 2-layer sanitize pipeline and return (envelope, removed).

envelope is the wrapped <untrusted_content>...</untrusted_content> string ready to hand to the caller LLM; removed is the cumulative list of pattern labels stripped by both layers.

§Errors

Returns crate::Error::Http only if the semantic layer’s HTTP call fails before the fail-open fallback engages (e.g. TLS handshake failure). API non-2xx is not an error here — see semantic_layer::review.