-
Notifications
You must be signed in to change notification settings - Fork 182
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
Don't create subtasks when not using tools #1489
Conversation
Codecov ReportAttention: Patch coverage is
📢 Thoughts on this report? Let us know! |
1948bff
to
984629e
Compare
subtask = self.add_subtask(ActionsSubtask(result.to_artifact())) | ||
else: | ||
break | ||
break |
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.
Not introduced by this change
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.
Optional suggestion
if self.tools: | ||
subtask = self.add_subtask(ActionsSubtask(result.to_artifact())) | ||
|
||
while True: |
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.
You could avoid some nesting if you flip the condition:
if not self.tools:
self.output = result.to_artifact()
return self.output
while True:
...
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.
I'd rather keep the conditional positive and solve the ugly nested code separately here.
Describe your changes
Don't create subtasks when not using tools
Issue ticket number and link
Introduced via #1463