Skip to content
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

Use subtask output if no action output #1068

Merged
merged 2 commits into from
Aug 16, 2024
Merged

Conversation

collindutter
Copy link
Member

Describe your changes

If an ActionsSubtask crashes before any of its ToolAction's have an output, that output should be used as the ToolAction output when building ActionArtifacts.

This fixes An assistant message with 'tool_calls' must be followed by tool messages responding to each 'tool_call_id'. The following tool_call_ids did not have response messages.

Issue ticket number and link

Offline discussion.

vasinov
vasinov previously approved these changes Aug 16, 2024
Base automatically changed from hotfix/workflow-threads to main August 16, 2024 18:19
@collindutter collindutter dismissed vasinov’s stale review August 16, 2024 18:19

The base branch was changed.

@collindutter collindutter force-pushed the hotfix/toolkit-output branch from 55dab28 to 63d3a38 Compare August 16, 2024 18:27
@collindutter collindutter requested a review from vasinov August 16, 2024 18:27
@@ -83,7 +83,7 @@ def prompt_stack(self) -> PromptStack:
for action in s.actions
]
action_results = [
ToolAction(name=action.name, path=action.path, tag=action.tag, output=action.output)
ToolAction(name=action.name, path=action.path, tag=action.tag, output=action.output or s.output)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

None check?

Suggested change
ToolAction(name=action.name, path=action.path, tag=action.tag, output=action.output or s.output)
ToolAction(name=action.name, path=action.path, tag=action.tag, output=action.output if action.output is not None else s.output)

@collindutter collindutter requested a review from vachillo August 16, 2024 18:40
@collindutter collindutter force-pushed the hotfix/toolkit-output branch from 63d3a38 to 5458397 Compare August 16, 2024 18:40
@collindutter collindutter merged commit f1d8a39 into main Aug 16, 2024
13 checks passed
@collindutter collindutter deleted the hotfix/toolkit-output branch August 16, 2024 19:06
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants