pub fn parse_string_list(response: &str) -> Result<Vec<String>, ParseError>Expand description
Parse an LLM response into a cleaned list of strings.
Cleaning: lowercase, trim, deduplicate, filter empties, filter >50 chars.
This is the direct successor to ollama-vision’s parse_tags.
Strategies (in order):
- Direct JSON array
- JSON object with common list keys (“tags”, “items”, “results”, “list”)
- Markdown code block -> JSON array/object
- Bracket-matched JSON array
- JSON repair on best candidate
- Numbered/bulleted list extraction
- Comma-separated fallback