Skip to main content

content_text

Function content_text 

Source
pub fn content_text(content: &Value) -> String
Expand description

Extract plain text from a message content value.

Content is either a string or an OpenAI-style array of parts. Callers that need text (prompt assembly, substring search) must agree on one reading, so it lives in the contract instead of being reimplemented per crate.