mirror of https://github.com/microsoft/autogen.git
bump version to 0.2.9 (#1430)
* Fixed rounding bug. * bump version to 0.2.9 * fix format error * simplify contrib tests --------- Co-authored-by: Adam Fourney <adamfo@microsoft.com>
This commit is contained in:
parent
1ab2354009
commit
fd0094ce51
|
@ -27,7 +27,7 @@ jobs:
|
||||||
fail-fast: false
|
fail-fast: false
|
||||||
matrix:
|
matrix:
|
||||||
os: [ubuntu-latest, macos-latest, windows-2019]
|
os: [ubuntu-latest, macos-latest, windows-2019]
|
||||||
python-version: ["3.8", "3.9", "3.10", "3.11"]
|
python-version: ["3.9", "3.10", "3.11"]
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v3
|
- uses: actions/checkout@v3
|
||||||
- name: Set up Python ${{ matrix.python-version }}
|
- name: Set up Python ${{ matrix.python-version }}
|
||||||
|
@ -38,12 +38,12 @@ jobs:
|
||||||
run: |
|
run: |
|
||||||
python -m pip install --upgrade pip wheel
|
python -m pip install --upgrade pip wheel
|
||||||
pip install pytest
|
pip install pytest
|
||||||
- name: Install qdrant_client when python-version is 3.8 and 3.10
|
- name: Install qdrant_client when python-version is 3.10
|
||||||
if: matrix.python-version == '3.8' || matrix.python-version == '3.10'
|
if: matrix.python-version == '3.10'
|
||||||
run: |
|
run: |
|
||||||
pip install qdrant_client[fastembed]
|
pip install qdrant_client[fastembed]
|
||||||
- name: Install unstructured when python-version is 3.9 and 3.11 and not windows
|
- name: Install unstructured when python-version is 3.9 and not windows
|
||||||
if: (matrix.python-version == '3.9' || matrix.python-version == '3.11') && matrix.os != 'windows-2019'
|
if: matrix.python-version == '3.9' && matrix.os != 'windows-2019'
|
||||||
run: |
|
run: |
|
||||||
pip install unstructured[all-docs]
|
pip install unstructured[all-docs]
|
||||||
- name: Install packages and dependencies for RetrieveChat
|
- name: Install packages and dependencies for RetrieveChat
|
||||||
|
@ -59,13 +59,11 @@ jobs:
|
||||||
run: |
|
run: |
|
||||||
pytest test/test_retrieve_utils.py test/agentchat/contrib/test_retrievechat.py test/agentchat/contrib/test_qdrant_retrievechat.py --skip-openai
|
pytest test/test_retrieve_utils.py test/agentchat/contrib/test_retrievechat.py test/agentchat/contrib/test_qdrant_retrievechat.py --skip-openai
|
||||||
- name: Coverage
|
- name: Coverage
|
||||||
if: matrix.python-version == '3.10'
|
|
||||||
run: |
|
run: |
|
||||||
pip install coverage>=5.3
|
pip install coverage>=5.3
|
||||||
coverage run -a -m pytest test/test_retrieve_utils.py test/agentchat/contrib/test_retrievechat.py test/agentchat/contrib/test_qdrant_retrievechat.py --skip-openai
|
coverage run -a -m pytest test/test_retrieve_utils.py test/agentchat/contrib/test_retrievechat.py test/agentchat/contrib/test_qdrant_retrievechat.py --skip-openai
|
||||||
coverage xml
|
coverage xml
|
||||||
- name: Upload coverage to Codecov
|
- name: Upload coverage to Codecov
|
||||||
if: matrix.python-version == '3.10'
|
|
||||||
uses: codecov/codecov-action@v3
|
uses: codecov/codecov-action@v3
|
||||||
with:
|
with:
|
||||||
file: ./coverage.xml
|
file: ./coverage.xml
|
||||||
|
@ -77,7 +75,7 @@ jobs:
|
||||||
fail-fast: false
|
fail-fast: false
|
||||||
matrix:
|
matrix:
|
||||||
os: [ubuntu-latest, macos-latest, windows-2019]
|
os: [ubuntu-latest, macos-latest, windows-2019]
|
||||||
python-version: ["3.8", "3.9", "3.10", "3.11", "3.12"]
|
python-version: ["3.8"]
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v3
|
- uses: actions/checkout@v3
|
||||||
- name: Set up Python ${{ matrix.python-version }}
|
- name: Set up Python ${{ matrix.python-version }}
|
||||||
|
@ -97,18 +95,12 @@ jobs:
|
||||||
if [[ ${{ matrix.os }} != ubuntu-latest ]]; then
|
if [[ ${{ matrix.os }} != ubuntu-latest ]]; then
|
||||||
echo "AUTOGEN_USE_DOCKER=False" >> $GITHUB_ENV
|
echo "AUTOGEN_USE_DOCKER=False" >> $GITHUB_ENV
|
||||||
fi
|
fi
|
||||||
- name: Test Compression
|
|
||||||
if: matrix.python-version != '3.10' # diversify the python versions
|
|
||||||
run: |
|
|
||||||
pytest test/agentchat/contrib/test_compressible_agent.py --skip-openai
|
|
||||||
- name: Coverage
|
- name: Coverage
|
||||||
if: matrix.python-version == '3.10'
|
|
||||||
run: |
|
run: |
|
||||||
pip install coverage>=5.3
|
pip install coverage>=5.3
|
||||||
coverage run -a -m pytest test/agentchat/contrib/test_compressible_agent.py --skip-openai
|
coverage run -a -m pytest test/agentchat/contrib/test_compressible_agent.py --skip-openai
|
||||||
coverage xml
|
coverage xml
|
||||||
- name: Upload coverage to Codecov
|
- name: Upload coverage to Codecov
|
||||||
if: matrix.python-version == '3.10'
|
|
||||||
uses: codecov/codecov-action@v3
|
uses: codecov/codecov-action@v3
|
||||||
with:
|
with:
|
||||||
file: ./coverage.xml
|
file: ./coverage.xml
|
||||||
|
@ -120,7 +112,7 @@ jobs:
|
||||||
fail-fast: false
|
fail-fast: false
|
||||||
matrix:
|
matrix:
|
||||||
os: [ubuntu-latest, macos-latest, windows-2019]
|
os: [ubuntu-latest, macos-latest, windows-2019]
|
||||||
python-version: ["3.8", "3.9", "3.10", "3.11", "3.12"]
|
python-version: ["3.10"]
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v3
|
- uses: actions/checkout@v3
|
||||||
- name: Set up Python ${{ matrix.python-version }}
|
- name: Set up Python ${{ matrix.python-version }}
|
||||||
|
@ -140,18 +132,12 @@ jobs:
|
||||||
if [[ ${{ matrix.os }} != ubuntu-latest ]]; then
|
if [[ ${{ matrix.os }} != ubuntu-latest ]]; then
|
||||||
echo "AUTOGEN_USE_DOCKER=False" >> $GITHUB_ENV
|
echo "AUTOGEN_USE_DOCKER=False" >> $GITHUB_ENV
|
||||||
fi
|
fi
|
||||||
- name: Test GPTAssistantAgent
|
|
||||||
if: matrix.python-version != '3.11' # diversify the python versions
|
|
||||||
run: |
|
|
||||||
pytest test/agentchat/contrib/test_gpt_assistant.py --skip-openai
|
|
||||||
- name: Coverage
|
- name: Coverage
|
||||||
if: matrix.python-version == '3.11'
|
|
||||||
run: |
|
run: |
|
||||||
pip install coverage>=5.3
|
pip install coverage>=5.3
|
||||||
coverage run -a -m pytest test/agentchat/contrib/test_gpt_assistant.py --skip-openai
|
coverage run -a -m pytest test/agentchat/contrib/test_gpt_assistant.py --skip-openai
|
||||||
coverage xml
|
coverage xml
|
||||||
- name: Upload coverage to Codecov
|
- name: Upload coverage to Codecov
|
||||||
if: matrix.python-version == '3.11'
|
|
||||||
uses: codecov/codecov-action@v3
|
uses: codecov/codecov-action@v3
|
||||||
with:
|
with:
|
||||||
file: ./coverage.xml
|
file: ./coverage.xml
|
||||||
|
@ -163,7 +149,7 @@ jobs:
|
||||||
fail-fast: false
|
fail-fast: false
|
||||||
matrix:
|
matrix:
|
||||||
os: [ubuntu-latest, macos-latest, windows-2019]
|
os: [ubuntu-latest, macos-latest, windows-2019]
|
||||||
python-version: ["3.8", "3.9", "3.10", "3.11"]
|
python-version: ["3.11"]
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v3
|
- uses: actions/checkout@v3
|
||||||
- name: Set up Python ${{ matrix.python-version }}
|
- name: Set up Python ${{ matrix.python-version }}
|
||||||
|
@ -183,18 +169,12 @@ jobs:
|
||||||
if [[ ${{ matrix.os }} != ubuntu-latest ]]; then
|
if [[ ${{ matrix.os }} != ubuntu-latest ]]; then
|
||||||
echo "AUTOGEN_USE_DOCKER=False" >> $GITHUB_ENV
|
echo "AUTOGEN_USE_DOCKER=False" >> $GITHUB_ENV
|
||||||
fi
|
fi
|
||||||
- name: Test TeachableAgent
|
|
||||||
if: matrix.python-version != '3.9' # diversify the python versions
|
|
||||||
run: |
|
|
||||||
pytest test/agentchat/contrib/test_teachable_agent.py --skip-openai
|
|
||||||
- name: Coverage
|
- name: Coverage
|
||||||
if: matrix.python-version == '3.9'
|
|
||||||
run: |
|
run: |
|
||||||
pip install coverage>=5.3
|
pip install coverage>=5.3
|
||||||
coverage run -a -m pytest test/agentchat/contrib/test_teachable_agent.py --skip-openai
|
coverage run -a -m pytest test/agentchat/contrib/test_teachable_agent.py --skip-openai
|
||||||
coverage xml
|
coverage xml
|
||||||
- name: Upload coverage to Codecov
|
- name: Upload coverage to Codecov
|
||||||
if: matrix.python-version == '3.9'
|
|
||||||
uses: codecov/codecov-action@v3
|
uses: codecov/codecov-action@v3
|
||||||
with:
|
with:
|
||||||
file: ./coverage.xml
|
file: ./coverage.xml
|
||||||
|
@ -206,7 +186,7 @@ jobs:
|
||||||
fail-fast: false
|
fail-fast: false
|
||||||
matrix:
|
matrix:
|
||||||
os: [ubuntu-latest, macos-latest, windows-2019]
|
os: [ubuntu-latest, macos-latest, windows-2019]
|
||||||
python-version: ["3.8", "3.9", "3.10", "3.11"]
|
python-version: ["3.12"]
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v3
|
- uses: actions/checkout@v3
|
||||||
- name: Set up Python ${{ matrix.python-version }}
|
- name: Set up Python ${{ matrix.python-version }}
|
||||||
|
@ -226,18 +206,12 @@ jobs:
|
||||||
if [[ ${{ matrix.os }} != ubuntu-latest ]]; then
|
if [[ ${{ matrix.os }} != ubuntu-latest ]]; then
|
||||||
echo "AUTOGEN_USE_DOCKER=False" >> $GITHUB_ENV
|
echo "AUTOGEN_USE_DOCKER=False" >> $GITHUB_ENV
|
||||||
fi
|
fi
|
||||||
- name: Test WebSurfer
|
|
||||||
if: matrix.python-version != '3.10' # diversify the python versions
|
|
||||||
run: |
|
|
||||||
pytest test/test_browser_utils.py test/agentchat/contrib/test_web_surfer.py --skip-openai
|
|
||||||
- name: Coverage
|
- name: Coverage
|
||||||
if: matrix.python-version == '3.10'
|
|
||||||
run: |
|
run: |
|
||||||
pip install coverage>=5.3
|
pip install coverage>=5.3
|
||||||
coverage run -a -m pytest test/test_browser_utils.py test/agentchat/contrib/test_web_surfer.py --skip-openai
|
coverage run -a -m pytest test/test_browser_utils.py test/agentchat/contrib/test_web_surfer.py --skip-openai
|
||||||
coverage xml
|
coverage xml
|
||||||
- name: Upload coverage to Codecov
|
- name: Upload coverage to Codecov
|
||||||
if: matrix.python-version == '3.10'
|
|
||||||
uses: codecov/codecov-action@v3
|
uses: codecov/codecov-action@v3
|
||||||
with:
|
with:
|
||||||
file: ./coverage.xml
|
file: ./coverage.xml
|
||||||
|
@ -249,7 +223,7 @@ jobs:
|
||||||
fail-fast: false
|
fail-fast: false
|
||||||
matrix:
|
matrix:
|
||||||
os: [ubuntu-latest, macos-latest, windows-2019]
|
os: [ubuntu-latest, macos-latest, windows-2019]
|
||||||
python-version: ["3.8", "3.9", "3.10", "3.11", "3.12"]
|
python-version: ["3.12"]
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v3
|
- uses: actions/checkout@v3
|
||||||
- name: Set up Python ${{ matrix.python-version }}
|
- name: Set up Python ${{ matrix.python-version }}
|
||||||
|
@ -269,17 +243,12 @@ jobs:
|
||||||
if [[ ${{ matrix.os }} != ubuntu-latest ]]; then
|
if [[ ${{ matrix.os }} != ubuntu-latest ]]; then
|
||||||
echo "AUTOGEN_USE_DOCKER=False" >> $GITHUB_ENV
|
echo "AUTOGEN_USE_DOCKER=False" >> $GITHUB_ENV
|
||||||
fi
|
fi
|
||||||
- name: Test LMM and LLaVA
|
|
||||||
run: |
|
|
||||||
pytest test/agentchat/contrib/test_img_utils.py test/agentchat/contrib/test_lmm.py test/agentchat/contrib/test_llava.py --skip-openai
|
|
||||||
- name: Coverage
|
- name: Coverage
|
||||||
if: matrix.python-version == '3.10'
|
|
||||||
run: |
|
run: |
|
||||||
pip install coverage>=5.3
|
pip install coverage>=5.3
|
||||||
coverage run -a -m pytest test/agentchat/contrib/test_img_utils.py test/agentchat/contrib/test_lmm.py test/agentchat/contrib/test_llava.py --skip-openai
|
coverage run -a -m pytest test/agentchat/contrib/test_img_utils.py test/agentchat/contrib/test_lmm.py test/agentchat/contrib/test_llava.py --skip-openai
|
||||||
coverage xml
|
coverage xml
|
||||||
- name: Upload coverage to Codecov
|
- name: Upload coverage to Codecov
|
||||||
if: matrix.python-version == '3.10'
|
|
||||||
uses: codecov/codecov-action@v3
|
uses: codecov/codecov-action@v3
|
||||||
with:
|
with:
|
||||||
file: ./coverage.xml
|
file: ./coverage.xml
|
||||||
|
|
|
@ -1 +1 @@
|
||||||
__version__ = "0.2.8"
|
__version__ = "0.2.9"
|
||||||
|
|
|
@ -356,7 +356,6 @@
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
"source": [
|
"source": [
|
||||||
"\n",
|
|
||||||
"assistant = AssistantAgent(\n",
|
"assistant = AssistantAgent(\n",
|
||||||
" \"assistant\",\n",
|
" \"assistant\",\n",
|
||||||
" system_message=\"You are a helpful assistant.\",\n",
|
" system_message=\"You are a helpful assistant.\",\n",
|
||||||
|
|
|
@ -167,7 +167,7 @@
|
||||||
" quote_currency: Annotated[CurrencySymbol, \"Quote currency\"] = \"EUR\",\n",
|
" quote_currency: Annotated[CurrencySymbol, \"Quote currency\"] = \"EUR\",\n",
|
||||||
") -> str:\n",
|
") -> str:\n",
|
||||||
" quote_amount = exchange_rate(base_currency, quote_currency) * base_amount\n",
|
" quote_amount = exchange_rate(base_currency, quote_currency) * base_amount\n",
|
||||||
" return f\"{quote_amount} {quote_currency}\"\n"
|
" return f\"{quote_amount} {quote_currency}\""
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
|
|
|
@ -101,7 +101,7 @@
|
||||||
" \"config_list\": config_list,\n",
|
" \"config_list\": config_list,\n",
|
||||||
" \"assistant_id\": assistant_id,\n",
|
" \"assistant_id\": assistant_id,\n",
|
||||||
" \"tools\": [{\"type\": \"retrieval\"}],\n",
|
" \"tools\": [{\"type\": \"retrieval\"}],\n",
|
||||||
" \"file_ids\": [\"file-CmlT0YKLB3ZCdHmslF9FOv69\"]\n",
|
" \"file_ids\": [\"file-CmlT0YKLB3ZCdHmslF9FOv69\"],\n",
|
||||||
" # add id of an existing file in your openai account\n",
|
" # add id of an existing file in your openai account\n",
|
||||||
" # in this case I added the implementation of conversable_agent.py\n",
|
" # in this case I added the implementation of conversable_agent.py\n",
|
||||||
"}\n",
|
"}\n",
|
||||||
|
|
|
@ -49,7 +49,6 @@
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
"source": [
|
"source": [
|
||||||
"\n",
|
|
||||||
"# load an agent specification in JSON\n",
|
"# load an agent specification in JSON\n",
|
||||||
"agent_spec = json.load(open(\"agent_spec.json\"))\n",
|
"agent_spec = json.load(open(\"agent_spec.json\"))\n",
|
||||||
"\n",
|
"\n",
|
||||||
|
|
|
@ -4,6 +4,7 @@ import sys
|
||||||
import requests
|
import requests
|
||||||
import hashlib
|
import hashlib
|
||||||
import re
|
import re
|
||||||
|
import math
|
||||||
|
|
||||||
from agentchat.test_assistant_agent import KEY_LOC # noqa: E402
|
from agentchat.test_assistant_agent import KEY_LOC # noqa: E402
|
||||||
|
|
||||||
|
@ -78,7 +79,7 @@ def test_simple_text_browser():
|
||||||
assert BLOG_POST_STRING in browser.page_content
|
assert BLOG_POST_STRING in browser.page_content
|
||||||
|
|
||||||
# Check if page splitting works
|
# Check if page splitting works
|
||||||
approx_pages = int(len(browser.page_content) / viewport_size + 0.5) # May be fewer, since it aligns to word breaks
|
approx_pages = math.ceil(len(browser.page_content) / viewport_size) # May be fewer, since it aligns to word breaks
|
||||||
assert len(browser.viewport_pages) <= approx_pages
|
assert len(browser.viewport_pages) <= approx_pages
|
||||||
assert abs(len(browser.viewport_pages) - approx_pages) <= 1 # allow only a small deviation
|
assert abs(len(browser.viewport_pages) - approx_pages) <= 1 # allow only a small deviation
|
||||||
assert browser.viewport_pages[0][0] == 0
|
assert browser.viewport_pages[0][0] == 0
|
||||||
|
|
Loading…
Reference in New Issue