slidedeckai.helpers.text_helper.get_clean_json#
- slidedeckai.helpers.text_helper.get_clean_json(json_str: str) str[source]#
Attempt to clean a JSON response string from the LLM by removing
`json at the beginning and trailing `and any text beyond that. CAUTION: May not be always accurate.- Parameters:
json_str – The input string in JSON format.
- Returns:
The “cleaned” JSON string.