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

fix the problem config_list_from_dotenv() can't correctly get other p… #2172

Merged
merged 11 commits into from
Mar 30, 2024
Merged

fix the problem config_list_from_dotenv() can't correctly get other p… #2172

merged 11 commits into from
Mar 30, 2024

Conversation

Wannabeasmartguy
Copy link
Contributor

Why are these changes needed?

As you can see, when I was testing the code shown below, I found that I couldn't get the configuration information saved in .env correctly with config_list_from_dotenv(). The version of pyautogen is 0.2.20, which is the latest release.

image

And my .env is like this:

image

Then I realized that get_config() was using the wrong parameter to get the configuration, and changed it to get the other parameters correctly.

After the modification, the code works fine.

image

Related issue number

Checks

@sonichi sonichi requested review from ekzhu and AaronWard March 28, 2024 05:09
@codecov-commenter
Copy link

codecov-commenter commented Mar 28, 2024

Codecov Report

Attention: Patch coverage is 0% with 3 lines in your changes are missing coverage. Please review.

Project coverage is 49.51%. Comparing base (20893fc) to head (2ec5aaf).
Report is 1 commits behind head on main.

Files Patch % Lines
autogen/oai/openai_utils.py 0.00% 3 Missing ⚠️
Additional details and impacted files
@@             Coverage Diff             @@
##             main    #2172       +/-   ##
===========================================
+ Coverage   37.54%   49.51%   +11.96%     
===========================================
  Files          77       77               
  Lines        7711     7711               
  Branches     1655     1791      +136     
===========================================
+ Hits         2895     3818      +923     
+ Misses       4573     3577      -996     
- Partials      243      316       +73     
Flag Coverage Δ
unittest 14.20% <0.00%> (?)
unittests 48.43% <0.00%> (+10.90%) ⬆️

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.

Copy link
Collaborator

@AaronWard AaronWard left a comment

Choose a reason for hiding this comment

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

Nice work on noticing that edge case, let me know what you think of the comment below 👍

autogen/oai/openai_utils.py Outdated Show resolved Hide resolved
@ekzhu ekzhu requested a review from sonichi March 28, 2024 17:50
Copy link
Collaborator

@AaronWard AaronWard left a comment

Choose a reason for hiding this comment

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

LGTM 👍

@sonichi sonichi enabled auto-merge March 30, 2024 01:17
@sonichi sonichi added this pull request to the merge queue Mar 30, 2024
Merged via the queue into microsoft:main with commit 6ed8f69 Mar 30, 2024
60 of 72 checks passed
whiskyboy pushed a commit to whiskyboy/autogen that referenced this pull request Apr 17, 2024
microsoft#2172)

* fix the problem config_list_from_dotenv() can't correctly get other params

* Update openai_utils.py

---------

Co-authored-by: Aaron <[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.

4 participants