mirror of
https://github.com/microsoft/autogen.git
synced 2026-02-13 15:05:23 -05:00
* Initial commit. * Disable LLM response caching. * Add teachability option to setup.py * Modify test to use OAI_CONFIG_LIST as suggested in the docs. * Expand unit test. * Complete unit test. * Add filter_dict * details * AnalysisAgent * details * More documentation and debug output. * Support retrieval of any number of relevant memos, including zero. * More robust analysis separator. * cleanup * teach_config * refactoring * For robustness, allow more flexibility on memo storage and retrieval. * de-dupe the retrieved memos. * Simplify AnalysisAgent. The unit tests now pass with gpt-3.5 * comments * Add a verbosity level to control analyzer messages. * refactoring * comments * Persist memory on disk. * cleanup * Use markdown to format retrieved memos. * Use markdown in TextAnalyzerAgent * Add another verbosity level. * clean up logging * notebook * minor edits * cleanup * linter fixes * Skip tests that fail to import openai * Address reviewer feedback. * lint * refactoring * Improve wording * Improve code coverage. * lint * Use llm_config to control caching. * lowercase notebook name * Sort out the parameters passed through to ConversableAgent, and supply full docstrings for the others. * lint * Allow TextAnalyzerAgent to be given a different llm_config than TeachableAgent. * documentation * Modifications to run openai workflow. * Test on just python 3.10. Replace agent with agent teachable_agent as recommended. * Test on python 3.9 instead of 3.10. * Remove space from name -> teachableagent --------- Co-authored-by: Li Jiang <bnujli@gmail.com> Co-authored-by: Chi Wang <wang.chi@microsoft.com>
88 lines
3.1 KiB
YAML
88 lines
3.1 KiB
YAML
# 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: OpenAI
|
|
|
|
on:
|
|
pull_request_target:
|
|
branches: ['main']
|
|
paths:
|
|
- 'autogen/**'
|
|
- 'test/**'
|
|
- 'notebook/agentchat_auto_feedback_from_code_execution.ipynb'
|
|
- 'notebook/agentchat_function_call.ipynb'
|
|
- 'notebook/agentchat_MathChat.ipynb'
|
|
- 'notebook/oai_completion.ipynb'
|
|
- 'notebook/oai_chatgpt_gpt4.ipynb'
|
|
- '.github/workflows/openai.yml'
|
|
|
|
jobs:
|
|
test:
|
|
strategy:
|
|
matrix:
|
|
os: [ubuntu-latest]
|
|
python-version: ["3.9", "3.10", "3.11"]
|
|
runs-on: ${{ matrix.os }}
|
|
environment: openai
|
|
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.[blendsearch]
|
|
python -c "import autogen"
|
|
pip install coverage pytest-asyncio datasets
|
|
- name: Install packages for test when needed
|
|
if: matrix.python-version == '3.9'
|
|
run: |
|
|
pip install docker
|
|
- name: Install packages for MathChat when needed
|
|
if: matrix.python-version != '3.11'
|
|
run: |
|
|
pip install -e .[mathchat]
|
|
- name: Install packages for RetrieveChat when needed
|
|
if: matrix.python-version == '3.9'
|
|
run: |
|
|
pip install -e .[retrievechat]
|
|
- name: Install packages for Teachable when needed
|
|
run: |
|
|
pip install -e .[teachable]
|
|
- name: Coverage
|
|
if: matrix.python-version == '3.9'
|
|
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
|
|
coverage xml
|
|
- name: Coverage and check notebook outputs
|
|
if: matrix.python-version != '3.9'
|
|
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 }}
|
|
WOLFRAM_ALPHA_APPID: ${{ secrets.WOLFRAM_ALPHA_APPID }}
|
|
OAI_CONFIG_LIST: ${{ secrets.OAI_CONFIG_LIST }}
|
|
run: |
|
|
pip install nbconvert nbformat ipykernel
|
|
coverage run -a -m pytest test/test_with_openai.py
|
|
coverage run -a -m pytest test/test_notebook.py
|
|
coverage xml
|
|
cat "$(pwd)/test/executed_openai_notebook_output.txt"
|
|
- name: Upload coverage to Codecov
|
|
uses: codecov/codecov-action@v3
|
|
with:
|
|
file: ./coverage.xml
|
|
flags: unittests
|