-
Notifications
You must be signed in to change notification settings - Fork 8.3k
Dev/v0.2 #393
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
Merged
Dev/v0.2 #393
Changes from all commits
Commits
Show all changes
43 commits
Select commit
Hold shift + click to select a range
d6761d1
api_base -> base_url (#383)
sonichi dfd5695
InvalidRequestError -> BadRequestError (#389)
sonichi c41be9c
remove api_key_path; close #388
sonichi c8f8cbc
Merge branch 'main' into dev/v0.2
sonichi 2f97b8b
close #402 (#403)
sonichi 1df493b
openai client (#419)
sonichi 23a107a
Merge branch 'main' into dev/v0.2
sonichi d77b1c9
_client -> client
sonichi 6a8eaf3
_client -> client
sonichi c3f58f3
extra kwargs
sonichi 75a6f7d
Completion -> client (#426)
sonichi 9b25c91
annotations
sonichi 8c1626c
import
sonichi 8d42528
reduce test
sonichi b8302a7
skip test
sonichi b09e6bb
skip test
sonichi f29fbc5
skip test
sonichi 4318e0e
debug test
sonichi 153f182
rename test
sonichi 645d60e
update workflow
sonichi 62eabc8
update workflow
sonichi f895633
env
sonichi a72c89d
py version
sonichi 9073eb7
doc improvement
sonichi b0ad39b
docstr update
sonichi 33de6a3
openai<1
sonichi b2e7f9c
Merge branch 'main' into dev/v0.2
sonichi 3b567c9
add tiktoken to dependency
sonichi 3cb3930
filter_func
sonichi cc9f0e0
async test
sonichi 62b0393
Merge branch 'main' into dev/v0.2
sonichi 82f3712
dependency
sonichi 420cbf0
migration guide (#477)
sonichi fa6fbec
Merge branch 'main' into dev/v0.2
sonichi ed1b77b
Merge branch 'main' into dev/v0.2
sonichi 1edddb8
deal with azure gpt-3.5
sonichi 57134a3
Merge branch 'main' into dev/v0.2
sonichi 4555eb3
add back test_eval_math_responses
sonichi 3bf520a
timeout
sonichi 8bb6e82
Add back tests for RetrieveChat (#480)
thinkall 37f8b14
Merge branch 'main' into dev/v0.2
sonichi a786cb6
retrieve chat is tested
sonichi 1f1459b
bump version to 0.2.0b1
sonichi File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,58 @@ | ||
| # This workflow will install Python dependencies and run tests | ||
| # For more information see: https://help.github.com/actions/language-and-framework-guides/using-python-with-github-actions | ||
|
|
||
| name: OpenAI4ContribTests | ||
|
|
||
| on: | ||
| pull_request_target: | ||
| branches: ['main'] | ||
| paths: | ||
| - 'autogen/**' | ||
| - 'test/agentchat/contrib/**' | ||
| - '.github/workflows/contrib-openai.yml' | ||
| - 'setup.py' | ||
|
|
||
| jobs: | ||
| RetrieveChatTest: | ||
| strategy: | ||
| matrix: | ||
| os: [ubuntu-latest] | ||
| python-version: ["3.10"] | ||
| runs-on: ${{ matrix.os }} | ||
| environment: openai1 | ||
| steps: | ||
| # checkout to pr branch | ||
| - name: Checkout | ||
| uses: actions/checkout@v3 | ||
| with: | ||
| ref: ${{ github.event.pull_request.head.sha }} | ||
| - name: Set up Python ${{ matrix.python-version }} | ||
| uses: actions/setup-python@v4 | ||
| with: | ||
| python-version: ${{ matrix.python-version }} | ||
| - name: Install packages and dependencies | ||
| run: | | ||
| docker --version | ||
| python -m pip install --upgrade pip wheel | ||
| pip install -e . | ||
| python -c "import autogen" | ||
| pip install coverage pytest-asyncio | ||
| - name: Install packages for test when needed | ||
| run: | | ||
| pip install docker | ||
| pip install qdrant_client[fastembed] | ||
| pip install -e .[retrievechat] | ||
| - name: Coverage | ||
| env: | ||
| OPENAI_API_KEY: ${{ secrets.OPENAI_API_KEY }} | ||
| AZURE_OPENAI_API_KEY: ${{ secrets.AZURE_OPENAI_API_KEY }} | ||
| AZURE_OPENAI_API_BASE: ${{ secrets.AZURE_OPENAI_API_BASE }} | ||
| OAI_CONFIG_LIST: ${{ secrets.OAI_CONFIG_LIST }} | ||
| run: | | ||
| coverage run -a -m pytest test/agentchat/contrib/test_retrievechat.py test/agentchat/contrib/test_qdrant_retrievechat.py | ||
| coverage xml | ||
| - name: Upload coverage to Codecov | ||
| uses: codecov/codecov-action@v3 | ||
| with: | ||
| file: ./coverage.xml | ||
| flags: unittests |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,59 @@ | ||
| # This workflow will install Python dependencies, run tests and lint with a variety of Python versions | ||
| # For more information see: https://help.github.com/actions/language-and-framework-guides/using-python-with-github-actions | ||
|
|
||
| name: ContribTests | ||
|
|
||
| on: | ||
| pull_request: | ||
| branches: ['main', 'dev/v0.2'] | ||
| paths: | ||
| - 'autogen/**' | ||
| - 'test/agentchat/contrib/**' | ||
| - '.github/workflows/contrib-tests.yml' | ||
| - 'setup.py' | ||
|
|
||
| concurrency: | ||
| group: ${{ github.workflow }}-${{ github.ref }}-${{ github.head_ref }} | ||
| cancel-in-progress: ${{ github.ref != 'refs/heads/main' }} | ||
|
|
||
| jobs: | ||
| RetrieveChatTest: | ||
| runs-on: ${{ matrix.os }} | ||
| strategy: | ||
| fail-fast: false | ||
| matrix: | ||
| os: [ubuntu-latest, macos-latest, windows-2019] | ||
| python-version: ["3.8", "3.9", "3.10", "3.11"] | ||
| steps: | ||
| - uses: actions/checkout@v3 | ||
| - name: Set up Python ${{ matrix.python-version }} | ||
| uses: actions/setup-python@v4 | ||
| with: | ||
| python-version: ${{ matrix.python-version }} | ||
| - name: Install packages and dependencies for all tests | ||
| run: | | ||
| python -m pip install --upgrade pip wheel | ||
| pip install pytest | ||
| - name: Install qdrant_client when python-version is 3.10 | ||
| if: matrix.python-version == '3.10' || matrix.python-version == '3.8' | ||
| run: | | ||
| pip install qdrant_client[fastembed] | ||
| - name: Install packages and dependencies for RetrieveChat | ||
| run: | | ||
| pip install -e .[retrievechat] | ||
| pip uninstall -y openai | ||
| - name: Test RetrieveChat | ||
| run: | | ||
| pytest test/test_retrieve_utils.py test/agentchat/contrib/test_retrievechat.py test/agentchat/contrib/test_qdrant_retrievechat.py | ||
| - name: Coverage | ||
| if: matrix.python-version == '3.10' | ||
| run: | | ||
| pip install coverage>=5.3 | ||
| coverage run -a -m pytest test/test_retrieve_utils.py test/agentchat/contrib | ||
| coverage xml | ||
| - name: Upload coverage to Codecov | ||
| if: matrix.python-version == '3.10' | ||
| uses: codecov/codecov-action@v3 | ||
| with: | ||
| file: ./coverage.xml | ||
| flags: unittests |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.