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

Convert ChatCompletionMessage to Dict after completion #791

Merged
merged 26 commits into from
Dec 10, 2023
Merged

Conversation

yiranwu0
Copy link
Collaborator

@yiranwu0 yiranwu0 commented Nov 28, 2023

Why are these changes needed?

  1. extract_text_or_function_call -> extract_text_or_completion_object. The extraction is now a dict or an completion object, changing the name for clarity.

  2. Ensure the return from generate_oai_reply is a str or dict, which is a vulnerability.

Note: Remaining issues with groupchat will be fixed in a separate PR. (When selector is making a function call).

Related issue number

#721

Checks

@codecov-commenter
Copy link

codecov-commenter commented Nov 28, 2023

Codecov Report

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

Comparison is base (a31b240) 26.72% compared to head (fe97bf2) 37.96%.

Files Patch % Lines
autogen/oai/client.py 37.50% 5 Missing ⚠️
autogen/agentchat/conversable_agent.py 0.00% 4 Missing ⚠️
autogen/agentchat/contrib/compressible_agent.py 0.00% 1 Missing ⚠️
Additional details and impacted files
@@             Coverage Diff             @@
##             main     #791       +/-   ##
===========================================
+ Coverage   26.72%   37.96%   +11.24%     
===========================================
  Files          28       28               
  Lines        3768     3777        +9     
  Branches      854      900       +46     
===========================================
+ Hits         1007     1434      +427     
+ Misses       2687     2217      -470     
- Partials       74      126       +52     
Flag Coverage Δ
unittests 37.91% <23.07%> (+11.24%) ⬆️

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.

@afourney
Copy link
Member

I think this is also related to #765

@sonichi sonichi added this pull request to the merge queue Dec 10, 2023
Merged via the queue into main with commit 9cec541 Dec 10, 2023
76 of 84 checks passed
@sonichi sonichi deleted the functotool branch December 10, 2023 03:31
rlam3 pushed a commit to rlam3/autogen that referenced this pull request Dec 19, 2023
* update

* update

* update signature

* update

* update

* fix test funccall groupchat

* reverse change

* update

* update

* update

* update

* update

---------

Co-authored-by: Qingyun Wu <[email protected]>
Co-authored-by: Chi Wang <[email protected]>
whiskyboy pushed a commit to whiskyboy/autogen that referenced this pull request Apr 17, 2024
* update

* update

* update signature

* update

* update

* fix test funccall groupchat

* reverse change

* update

* update

* update

* update

* update

---------

Co-authored-by: Qingyun Wu <[email protected]>
Co-authored-by: Chi Wang <[email protected]>
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.

6 participants