Python#
- council.skills.python.build_code_generation_loop(code_generation: PythonCodeGenerationSkill, verification: PythonCodeVerificationSkill | None = None, execution: PythonCodeExecutionSkill | None = None, max_iteration: int = 10) RunnerBase [source]#
Helper function to build a python code generation loop, running the code generation skill until it successfully pass the verification and execution.
- Parameters:
code_generation (PythonCodeGenerationSkill) – skill to generate the python code
verification (Optional[PythonCodeVerificationSkill]) – optional static code verification skill
execution (Optional[PythonCodeExecutionSkill]) – optional code execution skill
max_iteration (int) – the maximum number of iteration for the generation/correction loop
- Return type: