Skip to main content

Module utils

Module utils 

Source
Expand description

Utility functions for extracting code blocks and building parts.

Functions§

build_code_execution_result_part
Build a CodeExecutionResult Part with OK or FAILED outcome.
build_executable_code_part
Build an ExecutableCode Part (language=PYTHON).
extract_code_from_text
Extract the first code block from text content using the given delimiters.