String utility functions

View source code here: GitHub

utils.strings.remove_code_block

Removes a fenced code block (triple backticks) and its language specifier if present.

Returns the cleaned text and the detected language (or None if no language was found).

Request Parameters

FieldTypeDescription
stringNo description

Response

FieldTypeDescription
statustyping.Literal['OK', 'ERROR']Status of the request.
languagetyping.Optional[str]The language of the code block, if specified
resulttyping.Optional[str]The contents of the string without a code block.
error_messagetyping.Optional[str]Error message if the command failed.

© 2025 South Patron LLC. All rights reserved.

AI everywhere.