Commit Graph

5 Commits

Author SHA1 Message Date
Devin AI
1df9b1b166 Add negative test cases and improve test coverage
- Add test for malformed template handling
- Add test for missing required parameters with proper error handling
- Improve test documentation and edge case coverage

Addresses GitHub review feedback from joaomdmoura and mplachta

Co-Authored-By: João <joao@crewai.com>
2025-06-21 21:01:12 +00:00
Devin AI
16110623b5 Fix failing CI test by correcting Task API usage
- Replace non-existent 'output_format' attribute with 'output_json'
- Update test_custom_format_instructions to use correct Pydantic model approach
- Enhance test_stop_words_configuration to properly test agent executor creation
- Update documentation example to use correct API (output_json instead of output_format)
- Validated API corrections work with local test script

Co-Authored-By: João <joao@crewai.com>
2025-06-21 20:45:55 +00:00
Devin AI
a6d9741d18 Fix failing tests and address comprehensive GitHub review feedback
- Fix undefined i18n variable error in test_i18n_slice_access method
- Replace Mock tools with proper BaseTool instances to fix validation errors
- Add comprehensive docstrings to all test methods explaining validation purpose
- Add pytest fixtures for test isolation with @pytest.fixture(autouse=True)
- Add parametrized tests for agent initialization patterns using @pytest.mark.parametrize
- Add negative test cases for default template behavior and incomplete templates
- Remove unused Mock and patch imports to fix lint errors
- Improve test organization by moving Pydantic models to top of file
- Add metadata (title, description, categoryId, priority) to documentation frontmatter
- Add showLineNumbers to all Python code blocks for better readability
- Add explicit security warnings about stop sequence pitfalls and template injection
- Improve header hierarchy consistency using #### for subsections
- Add cross-references between troubleshooting sections
- Document default parameter behaviors explicitly
- Add additional troubleshooting steps for debugging prompts

Addresses all actionable feedback from GitHub reviews by joaomdmoura and mplachta.
Fixes failing CI tests by using proper CrewAI API patterns and BaseTool instances.

Co-Authored-By: João <joao@crewai.com>
2025-06-21 20:37:04 +00:00
Devin AI
f341d25fe6 Fix lint and import issues in test file
- Remove unused imports (pytest, Crew) to fix lint errors
- Fix LiteAgent import path from crewai.lite_agent
- Resolves CI test collection error for Python 3.10

Co-Authored-By: João <joao@crewai.com>
2025-06-21 20:24:09 +00:00
Devin AI
ba052dc7f3 Add comprehensive prompt customization documentation
- Create detailed guide explaining CrewAI's prompt generation system
- Document template system stored in translations/en.json
- Explain prompt assembly process using Prompts class
- Document LiteAgent prompt generation methods
- Show how to customize system/user prompts with templates
- Explain format parameter and structured output control
- Document stop words configuration through response_template
- Add practical examples for common customization scenarios
- Include test file validating all documentation examples

Addresses issue #3045: How system and user prompts are generated

Co-Authored-By: João <joao@crewai.com>
2025-06-21 20:20:16 +00:00