pub fn parse_json_lenient<T>(text: String) -> Result<T, String>where
T: DeserializeOwned,
Expand description
Helper function to be used with Client::chat_completions_into().
Pass this function to chat_completions_into() to let it parse a JSON document. This function allows for some blabber emitted by the LLM, making things like explanations or markdown-style fences a non-issue.