refactor • AI Agent SDK
refactor: Refactor code to improve quality.
refactor
Method
</div>
This is a method of the CodeAgent class in the code_agent module.
Refactor code to improve quality.
Signature
def refactor(code: str, instructions: str, language: str) -> strParameters
ParamField
strCode to refactor
ParamField
strSpecific refactoring instructions
ParamField
strProgramming language **kwargs: Additional arguments
Returns
ResponseField
strRefactored code as string
Uses
completionValueError
Source
View on GitHubpraisonaiagents/agent/code_agent.py at line 386