- Update Crew class methods to enhance readability with consistent formatting and type hints.
- Change LLM class to inherit from BaseLLM for better structure.
- Remove unnecessary type checks and streamline tool handling in CrewAgentExecutor.
- Adjust BaseLLM to provide default implementations for stop words and context window size methods.
- Clean up AISuiteLLM by removing unused methods related to stop words and context window size.
* Support wildcard handling in `emit()`
Change `emit()` to call handlers registered for parent classes using
`isinstance()`. Ensures that base event handlers receive derived
events.
* Fix failing test
* Remove unused variable
* update interpolation to work with example response types in yaml docs
* make tests
* fix circular deps
* Fixing interpolation imports
* Improve test
---------
Co-authored-by: Vinicius Brasil <vini@hey.com>
Co-authored-by: Lorenze Jay <63378463+lorenzejay@users.noreply.github.com>
Here is the optimized version of the program.
Co-authored-by: codeflash-ai[bot] <148906541+codeflash-ai[bot]@users.noreply.github.com>
Co-authored-by: Brandon Hancock (bhancock_ai) <109994880+bhancockio@users.noreply.github.com>
Here is the optimized version of the `Repository` class.
Co-authored-by: codeflash-ai[bot] <148906541+codeflash-ai[bot]@users.noreply.github.com>
Co-authored-by: Brandon Hancock (bhancock_ai) <109994880+bhancockio@users.noreply.github.com>
* fix the _extract_thought
the regex string should be same with prompt in en.json:129
...\nThought: I now know the final answer\nFinal Answer: the...
* fix Action match
---------
Co-authored-by: Brandon Hancock (bhancock_ai) <109994880+bhancockio@users.noreply.github.com>
This update includes a note in the documentation instructing users to create a ./knowldge folder. All source files (such as .txt, .pdf, .xlsx, .json) should be placed in this folder for centralized management. This change aims to streamline file organization and improve accessibility across projects.
Co-authored-by: Brandon Hancock (bhancock_ai) <109994880+bhancockio@users.noreply.github.com>
This PR addresses an issue with the crewai run command following the creation of a flow project. Previously, the update command interfered with execution, causing it not to work as expected. With these changes, the command now runs according to the instructions in the readme.md, and it also improves deployment support when using CrewAI Cloud.
Co-authored-by: Brandon Hancock (bhancock_ai) <109994880+bhancockio@users.noreply.github.com>
* Support wildcard handling in `emit()`
Change `emit()` to call handlers registered for parent classes using
`isinstance()`. Ensures that base event handlers receive derived
events.
* Fix failing test
* Remove unused variable
* Update llms.mdx
Update Amazon Bedrock section with more information about the foundation models available.
* Update llms.mdx
fix the description of Amazon Bedrock section
* Update llms.mdx
Remove the incorrect </tab> tag
* Update llms.mdx
Add Claude 3.7 Sonnet to the Amazon Bedrock list
---------
Co-authored-by: Brandon Hancock (bhancock_ai) <109994880+bhancockio@users.noreply.github.com>
Co-authored-by: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com>
Co-authored-by: Joe Moura <joao@crewai.com>
Co-authored-by: João Moura <joaomdmoura@gmail.com>
* Enhance Event Listener with Rich Visualization and Improved Logging
* Add verbose flag to EventListener for controlled logging
* Update crew test to set EventListener verbose flag
* Refactor EventListener logging and visualization with improved tool usage tracking
* Improve task logging with task ID display in EventListener
* Fix EventListener tool branch removal and type hinting
* Add type hints to EventListener class attributes
* Simplify EventListener import in Crew class
* Refactor EventListener tree node creation and remove unused method
* Refactor EventListener to utilize ConsoleFormatter for improved logging and visualization
* Enhance EventListener with property setters for crew, task, agent, tool, flow, and method branches to streamline state management
* Refactor crew test to instantiate EventListener and set verbose flags for improved clarity in logging
* Keep private parts private
* Remove unused import and clean up type hints in EventListener
* Enhance flow logging in EventListener and ConsoleFormatter by including flow ID in tree creation and status updates for better traceability.
---------
Co-authored-by: Brandon Hancock <brandon@brandonhancock.io>
Co-authored-by: Brandon Hancock (bhancock_ai) <109994880+bhancockio@users.noreply.github.com>
- Update the _prepare_completion_params method to accept an optional tools parameter
- Modify the chat completion method to utilize the new tools parameter for enhanced functionality
- Clean up print statements for better code clarity
- Modify the return type of initialize_chat_llm function to allow for both LLM and BaseLLM instances
- Ensure compatibility with recent changes in create_llm function
- Update CustomLLM to accept a model parameter during initialization
- Modify test cases to include the new model argument
- Ensure JWTAuthLLM and TimeoutHandlingLLM also utilize the model parameter in their constructors
- Update type hints in create_llm function to support both LLM and BaseLLM types
- Add support for handling existing stop words in LLM configuration
- Ensure stop words are correctly merged and deduplicated
- Update type hints to support both LLM and BaseLLM types
- Modify imports in crew_chat.py to use LLM instead of BaseLLM
- Update type hints in llm_utils.py to use LLM type
- Add optional `stop` parameter to BaseLLM initialization
- Refactor type handling for LLM creation and usage