aiq.tool.code_execution.utils#
Attributes#
Functions#
|
Formatting code output to be displayed as an llm expects it. |
|
Extracting all text between last occurrence of separators[0] and [1]. |
|
|
|
|
|
|
|
Converts python doc to cmd help format. |
Module Contents#
- LOG#
- format_code_output(
- execution_dict: dict[str, str],
- code_output_begin: str,
- code_output_end: str,
- code_output_format: str = 'llama',
Formatting code output to be displayed as an llm expects it.
- _extract_between_separators( )#
Extracting all text between last occurrence of separators[0] and [1].
If extract_all is True, returning a list with all occurrences of text between separators.
- extract_code_to_execute( )#
- extract_code_output( )#
- unroll_files(input_files)#
- python_doc_to_cmd_help(doc_class, docs_prefix='', arg_prefix='')#
Converts python doc to cmd help format.
Will color the args and change the format to match what we use in cmd help.