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

cleaner definition of tool_responses fixes #1174 #1182

Merged

Conversation

yenif
Copy link
Collaborator

@yenif yenif commented Jan 9, 2024

Why are these changes needed?

I couldn't replicate #1174, but I could imagine how this could have created an empty tool_responses.

I could also do a defensive dict key filter on generate_oai_reply, but feels really dirty. ideally there would be built out types and then it would work to just take the keys from the dict that are needed for the type. But that is a bigger thing.

Related issue number

Closes #1174

Checks

@codecov-commenter
Copy link

codecov-commenter commented Jan 9, 2024

Codecov Report

Attention: 2 lines in your changes are missing coverage. Please review.

Comparison is base (2ca8aae) 30.41% compared to head (05d75a1) 48.79%.

Files Patch % Lines
autogen/agentchat/conversable_agent.py 80.00% 1 Missing and 1 partial ⚠️
Additional details and impacted files
@@             Coverage Diff             @@
##             main    #1182       +/-   ##
===========================================
+ Coverage   30.41%   48.79%   +18.37%     
===========================================
  Files          32       32               
  Lines        4301     4300        -1     
  Branches      993     1044       +51     
===========================================
+ Hits         1308     2098      +790     
+ Misses       2899     1998      -901     
- Partials       94      204      +110     
Flag Coverage Δ
unittests 48.69% <80.00%> (+18.33%) ⬆️

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.

@davorrunje
Copy link
Collaborator

I created PR #1184 today supporting streamed tool calls and I think I understand the new OpenAI API quite well now. I'll check this out carefully tomorrow, I am a bit too tired now.

@ekzhu
Copy link
Collaborator

ekzhu commented Jan 9, 2024

Are this and #1187 both required to close the bug #1174 ?

@ekzhu ekzhu mentioned this pull request Jan 9, 2024
3 tasks
@sonichi sonichi enabled auto-merge January 9, 2024 22:40
@sonichi sonichi added this pull request to the merge queue Jan 9, 2024
Merged via the queue into microsoft:main with commit c103699 Jan 9, 2024
79 of 84 checks passed
@sonichi sonichi deleted the fix_definition_of_empty_tool_responses branch January 9, 2024 23:20
whiskyboy pushed a commit to whiskyboy/autogen that referenced this pull request Apr 17, 2024
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.

[Bug]: Async_human_input openai.BadRequestError
5 participants