-
Notifications
You must be signed in to change notification settings - Fork 3.7k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat: Add planning feature to crew #919
Conversation
@pythonbyte could you add docs and link them in |
Nice catch @joaomdmoura thanks for reminding me. |
@@ -326,9 +328,14 @@ def get_agent_by_role(role: str) -> Union["BaseAgent", None]: | |||
|
|||
def _create_converter(self, *args, **kwargs) -> Converter: | |||
"""Create a converter instance.""" | |||
converter = self.agent.get_output_converter(*args, **kwargs) | |||
if self.converter_cls: | |||
if self.agent and not self.converter_cls: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This was added to fix the Type Checking issue that was before this task.
@joaomdmoura On a second note, I was talking with @bhancockio, and we realized that the "if sef.converter_cls" was added by this PR #800
The issue with this overall function is that based on the typed return it should return a Converter, but both self.agent.get_output_converter and self.converter_cls could be None. So for now I'm raising the exception, but do you think is there something better that we can do it here or if its relevant to have this "converter_cls"?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
* feat: add planning feature to crew * feat: add test to planning handler and change to execute_async method * docs: add planning parameter to the Core documentation * docs: add planning docs * fix: fix type checking issue * fix: test and logic
* feat: add planning feature to crew * feat: add test to planning handler and change to execute_async method * docs: add planning parameter to the Core documentation * docs: add planning docs * fix: fix type checking issue * fix: test and logic
* feat: add planning feature to crew * feat: add test to planning handler and change to execute_async method * docs: add planning parameter to the Core documentation * docs: add planning docs * fix: fix type checking issue * fix: test and logic
This PR aims to add the Plan and Execution ability to the Crew.
With Crew(planning=True) before the Crew runs an AgentPlanner will be responsible for creating a step-by-step plan for each task on the crew and that plan is added to each task description to guide and improve the output