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

feat: add indictor for tool failure to FunctionExecutionResult #5428

Merged
merged 11 commits into from
Feb 10, 2025

Conversation

wistuba
Copy link
Contributor

@wistuba wistuba commented Feb 7, 2025

Why are these changes needed?

Some LLMs recieve an explicit signal about tool use failures. This change will allow

Related issue number

Closes #5273

Checks

We probably want to add some additional testing. I need some advice where to add it.

@wistuba
Copy link
Contributor Author

wistuba commented Feb 7, 2025

@microsoft-github-policy-service agree company="Amazon"

1 similar comment
@wistuba
Copy link
Contributor Author

wistuba commented Feb 7, 2025

@microsoft-github-policy-service agree company="Amazon"

@wistuba wistuba requested a review from ekzhu February 8, 2025 17:30
Copy link
Collaborator

@ekzhu ekzhu left a comment

Choose a reason for hiding this comment

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

You can run uv sync --all-extras in the 'python' directory to sync your local environment. There is no dependency change so there shouldn't be update to the uv.lock file

python/uv.lock Outdated Show resolved Hide resolved
@wistuba
Copy link
Contributor Author

wistuba commented Feb 8, 2025

You can run uv sync --all-extras in the 'python' directory to sync your local environment. There is no dependency change so there shouldn't be update to the uv.lock file

I did that. Doesn't help. I manually reverted it, but the uv sync keeps reverting it. With main uv lock, I keep seeing issues with pyright when running poe check. It requires me to manually install pyright which may cause this problem:

RuntimeError: nodeenv failed; for more reliable node.js binaries try `pip install pyright[nodejs]`
Error: Sequence aborted after failed subtask 'pyright'

@wistuba wistuba requested a review from ekzhu February 8, 2025 20:12
@ekzhu
Copy link
Collaborator

ekzhu commented Feb 9, 2025

Could you try to purge your local virtualenv completely and recreate on again. Also make sure your uv installation is up-to-date.

git clone https://github.com/microsoft/autogen
cd autogen/python
uv venv --python=3.12
source .venv/bin/activate
uv sync --all-extras

I just ran the CI tests and it works. So likely your local environment setup has some issue.

Copy link

codecov bot commented Feb 9, 2025

Codecov Report

Attention: Patch coverage is 70.00000% with 6 lines in your changes missing coverage. Please review.

Project coverage is 78.32%. Comparing base (b8c5e49) to head (a18e154).
Report is 1 commits behind head on main.

Files with missing lines Patch % Lines
...togen_ext/agents/openai/_openai_assistant_agent.py 73.33% 4 Missing ⚠️
...t/src/autogen_agentchat/agents/_assistant_agent.py 50.00% 1 Missing ⚠️
...n-core/src/autogen_core/tool_agent/_caller_loop.py 0.00% 1 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main    #5428      +/-   ##
==========================================
- Coverage   78.32%   78.32%   -0.01%     
==========================================
  Files         165      165              
  Lines        9800     9803       +3     
==========================================
+ Hits         7676     7678       +2     
- Misses       2124     2125       +1     
Flag Coverage Δ
unittests 78.32% <70.00%> (-0.01%) ⬇️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@ekzhu ekzhu merged commit 7a772a2 into microsoft:main Feb 10, 2025
65 of 66 checks passed
@ekzhu
Copy link
Collaborator

ekzhu commented Feb 10, 2025

Thanks! For now we don't really have a sample showing this. I believe with Anthropic model client, we can utlize the error field to indicate error, as described there: https://docs.anthropic.com/en/docs/build-with-claude/tool-use#troubleshooting-errors.

#5205

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.

An error field in FunctionExecutionResult to explicitly indicate errors occurred during execution
2 participants