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

openai base url default to None; read files when env vars exist; remove deprecated models #1110

Merged
merged 2 commits into from
Dec 31, 2023

Conversation

sonichi
Copy link
Contributor

@sonichi sonichi commented Dec 31, 2023

Why are these changes needed?

  1. [Core] Extending inline docs for openai_utils.py, boosting coverage in test_utils.py, fixing #762 #1046 introduces a bug of defaulting openai base url to "". It causes test failures in https://github.com/microsoft/autogen/actions/runs/7366572506/job/20050787096?pr=1026
    This PR changes the default to None.
  2. [Core] Extending inline docs for openai_utils.py, boosting coverage in test_utils.py, fixing #762 #1046 introduces a test which fails with the current utils when env vars already exist: https://github.com/microsoft/autogen/actions/runs/7371478796/job/20058910737?pr=1110
    This PR changes the utility such that it tries to read from files even when the env vars exist, unless the file path or file names are explicitly set to None.
  3. This PR also removes models from the test which are going to be deprecated from Jan 4.

Related issue number

Checks

@codecov-commenter
Copy link

codecov-commenter commented Dec 31, 2023

Codecov Report

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

Comparison is base (a9483a4) 30.56% compared to head (fd2ea5e) 64.76%.

Files Patch % Lines
autogen/oai/openai_utils.py 86.66% 0 Missing and 4 partials ⚠️
autogen/oai/client.py 66.66% 0 Missing and 1 partial ⚠️
Additional details and impacted files
@@             Coverage Diff             @@
##             main    #1110       +/-   ##
===========================================
+ Coverage   30.56%   64.76%   +34.20%     
===========================================
  Files          30       30               
  Lines        4028     4033        +5     
  Branches      911      962       +51     
===========================================
+ Hits         1231     2612     +1381     
+ Misses       2723     1154     -1569     
- Partials       74      267      +193     
Flag Coverage Δ
unittests 64.66% <84.84%> (+34.15%) ⬆️

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

@yiranwu0 yiranwu0 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 added this pull request to the merge queue Dec 31, 2023
Merged via the queue into main with commit 3b0e059 Dec 31, 2023
84 checks passed
@sonichi sonichi deleted the baseurl branch December 31, 2023 18:29
afourney added a commit that referenced this pull request Jan 3, 2024
@afourney afourney mentioned this pull request Jan 3, 2024
3 tasks
github-merge-queue bot pushed a commit that referenced this pull request Jan 5, 2024
* Remove GPT-4 as the default model.

* Updated test_compressible_agent to work around a bug that would otherwise default to gpt-4. Revist after #1073 is addressed.

* Worked around another bug in test_compressible_agent. It seems the config_list was always empty!

* Reverted changes to compressible agent.

* Noted that GPT-4 is the preferred model in the OAI_CONFIG_LIST_sample and README.

* Fixed failing tests after #1110

* Update OAI_CONFIG_LIST_sample

Co-authored-by: Chi Wang <wang.chi@microsoft.com>

---------

Co-authored-by: Chi Wang <wang.chi@microsoft.com>
github-merge-queue bot pushed a commit that referenced this pull request Jan 22, 2024
* Initial commit of WebSurfer. Adds the browser_utils, and related tests. WebSurfer will be added in a subsequent commit.

* Added the web surfer agent, and related tests.

* Added a notebook to show how WebSurferAgent works.

* Fixed a typo.

* Updated test_web_surfer for compatibility with #1110.

* Updated skip_oai logic.

* Fixed code formatting.

* More pre-commit fixes.

* Added block to contrib-openai.yml

* Added block to contrib-openai.yml

* Added hook for BING_API_KEY

* Temporarily commented out other tests, per request.

* Fixed indentation (maybe?)

* Restoring contrib-openai.yml
quantum-ciphers pushed a commit to quantum-ciphers/autogen that referenced this pull request Jan 26, 2024
…#1093)

* Initial commit of WebSurfer. Adds the browser_utils, and related tests. WebSurfer will be added in a subsequent commit.

* Added the web surfer agent, and related tests.

* Added a notebook to show how WebSurferAgent works.

* Fixed a typo.

* Updated test_web_surfer for compatibility with microsoft#1110.

* Updated skip_oai logic.

* Fixed code formatting.

* More pre-commit fixes.

* Added block to contrib-openai.yml

* Added block to contrib-openai.yml

* Added hook for BING_API_KEY

* Temporarily commented out other tests, per request.

* Fixed indentation (maybe?)

* Restoring contrib-openai.yml
corleroux pushed a commit to corleroux/autogen that referenced this pull request Jan 30, 2024
…#1093)

* Initial commit of WebSurfer. Adds the browser_utils, and related tests. WebSurfer will be added in a subsequent commit.

* Added the web surfer agent, and related tests.

* Added a notebook to show how WebSurferAgent works.

* Fixed a typo.

* Updated test_web_surfer for compatibility with microsoft#1110.

* Updated skip_oai logic.

* Fixed code formatting.

* More pre-commit fixes.

* Added block to contrib-openai.yml

* Added block to contrib-openai.yml

* Added hook for BING_API_KEY

* Temporarily commented out other tests, per request.

* Fixed indentation (maybe?)

* Restoring contrib-openai.yml
whiskyboy pushed a commit to whiskyboy/autogen that referenced this pull request Apr 17, 2024
* add funccall example and doc

* revise to comments

* Update website/docs/Use-Cases/Auto-Generation.md

Co-authored-by: Chi Wang <wang.chi@microsoft.com>

* revise

* update

* minor update

* add test notebook

* update

---------

Co-authored-by: Chi Wang <wang.chi@microsoft.com>
whiskyboy pushed a commit to whiskyboy/autogen that referenced this pull request Apr 17, 2024
…ve deprecated models (microsoft#1110)

* openai base url default to None

* read from files when env vars exist
whiskyboy pushed a commit to whiskyboy/autogen that referenced this pull request Apr 17, 2024
* Remove GPT-4 as the default model.

* Updated test_compressible_agent to work around a bug that would otherwise default to gpt-4. Revist after microsoft#1073 is addressed.

* Worked around another bug in test_compressible_agent. It seems the config_list was always empty!

* Reverted changes to compressible agent.

* Noted that GPT-4 is the preferred model in the OAI_CONFIG_LIST_sample and README.

* Fixed failing tests after microsoft#1110

* Update OAI_CONFIG_LIST_sample

Co-authored-by: Chi Wang <wang.chi@microsoft.com>

---------

Co-authored-by: Chi Wang <wang.chi@microsoft.com>
whiskyboy pushed a commit to whiskyboy/autogen that referenced this pull request Apr 17, 2024
…#1093)

* Initial commit of WebSurfer. Adds the browser_utils, and related tests. WebSurfer will be added in a subsequent commit.

* Added the web surfer agent, and related tests.

* Added a notebook to show how WebSurferAgent works.

* Fixed a typo.

* Updated test_web_surfer for compatibility with microsoft#1110.

* Updated skip_oai logic.

* Fixed code formatting.

* More pre-commit fixes.

* Added block to contrib-openai.yml

* Added block to contrib-openai.yml

* Added hook for BING_API_KEY

* Temporarily commented out other tests, per request.

* Fixed indentation (maybe?)

* Restoring contrib-openai.yml
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