Skip to main content

content_hash

Function content_hash 

Source
pub fn content_hash(
    role: PromptRole,
    section: PromptSection,
    content: &str,
) -> String
Expand description

Stable SHA-256 identity over the response role, fragment kind, and body.

The section is the fragment’s stable kind. Line endings are normalized so equivalent Unix and Windows text has the same identity.