Back to prompt library
Initial Code Generation and Linting Integration
Linked challenge: Agentic Code Generation & Refinement
Prompt source
implementation1 lines1 sectionsNo variables0 checklist items
Implement the agent's ability to generate an initial Python function based on a given prompt (e.g., 'Generate a prime number checker'). Integrate your mock linter tool. The agent should call the linter after generating the code and analyze its output. Your implementation should use `client.beta.assistants.create` and `client.beta.threads.create` for the agent's lifecycle, and handle `requires_action` for tool calls.