From 1fd9e065c6a417f04d6de00b7be1184382cc1d83 Mon Sep 17 00:00:00 2001 From: Thomas Date: Mon, 4 Nov 2024 22:07:54 +0800 Subject: [PATCH 01/17] chore: Commit and push report --- .github/workflows/build-docker-images.yml | 121 ------------------ .github/workflows/ci.yml | 19 --- .github/workflows/run_test_and_gen_report.yml | 23 +++- 3 files changed, 19 insertions(+), 144 deletions(-) delete mode 100644 .github/workflows/build-docker-images.yml delete mode 100644 .github/workflows/ci.yml diff --git a/.github/workflows/build-docker-images.yml b/.github/workflows/build-docker-images.yml deleted file mode 100644 index b81cd1eb..00000000 --- a/.github/workflows/build-docker-images.yml +++ /dev/null @@ -1,121 +0,0 @@ -name: build & push docker images - -on: - push: - branches: - - main - tags: - - "*" - pull_request: - -jobs: - build: - runs-on: - - self-hosted - - ${{ matrix.platform }} - strategy: - fail-fast: false - matrix: - platform: - - linux/amd64 - # - linux/arm64 # Cannot build frontend (install apk packages) within acceptable time - steps: - - name: Prepare - run: | - platform=${{ matrix.platform }} - echo "PLATFORM_PAIR=${platform//\//-}" >> $GITHUB_ENV - - name: Checkout - uses: actions/checkout@v4 - - name: Set up Docker Buildx - uses: docker/setup-buildx-action@v3 - with: - platforms: ${{ matrix.platform }} - - name: Login to DockerHub - uses: docker/login-action@v3 - with: - username: ${{ secrets.DOCKERHUB_USERNAME }} - password: ${{ secrets.DOCKERHUB_TOKEN }} - - name: Docker meta - id: meta - uses: docker/metadata-action@v5 - with: - images: rss3/openagent - - name: Build and push by digest - id: build - uses: docker/build-push-action@v5 - with: - context: . - platforms: ${{ matrix.platform }} - labels: ${{ steps.meta.outputs.labels }} - outputs: type=image,name=rss3/openagent,push-by-digest=true,name-canonical=true,push=true - - name: Export digest - run: | - mkdir -p /tmp/digests - digest="${{ steps.build.outputs.digest }}" - touch "/tmp/digests/${digest#sha256:}" - - name: Upload digest - uses: actions/upload-artifact@v4 - with: - name: digests-${{ env.PLATFORM_PAIR }} - path: /tmp/digests/* - if-no-files-found: error - retention-days: 1 - - merge: - runs-on: ubuntu-latest - permissions: - contents: read - packages: write - id-token: write - needs: - - build - steps: - - name: Download digests - uses: actions/download-artifact@v4 - with: - path: /tmp/digests - pattern: digests-* - merge-multiple: true - - name: Set up Docker Buildx - uses: docker/setup-buildx-action@v3 - - - name: Log in to the Container registry - uses: docker/login-action@v3 - with: - registry: ghcr.io - username: ${{ github.actor }} - password: ${{ github.token }} - - - name: Login to DockerHub - uses: docker/login-action@v3 - with: - username: ${{ secrets.DOCKERHUB_USERNAME }} - password: ${{ secrets.DOCKERHUB_TOKEN }} - - - name: Extract metadata (tags, labels) for Docker - id: meta - uses: docker/metadata-action@v5 - with: - images: | - rss3/openagent - ghcr.io/${{ github.repository }} - tags: | - type=raw,value=latest,enable={{is_default_branch}} - type=raw,value=${{ matrix.arch }},enable={{is_default_branch}} - type=ref,event=tag - type=ref,event=branch - type=ref,event=pr - type=sha,prefix={{branch}}-,enable=${{ !startsWith(github.ref, 'refs/tags') && github.event_name != 'pull_request' }},event=branch - - - name: Create manifest list and push - working-directory: /tmp/digests - run: | - if [ ${{ github.event_name }} == 'pull_request' ]; then - ARGS="--dry-run" - fi - docker buildx imagetools create $(jq -cr '.tags | map("-t " + .) | join(" ")' <<< "$DOCKER_METADATA_OUTPUT_JSON") \ - $(printf 'rss3/openagent@sha256:%s ' *) $ARGS - - name: Inspect image - if: github.event_name != 'pull_request' - run: | - docker buildx imagetools inspect rss3/openagent:${{ steps.meta.outputs.version }} diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml deleted file mode 100644 index 46b753d2..00000000 --- a/.github/workflows/ci.yml +++ /dev/null @@ -1,19 +0,0 @@ -name: backend code quality - -on: - pull_request: - push: - branches: - - "main" - - "prod" - -jobs: - pre-commit: - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v3 - - uses: actions/setup-python@v3 - - run: pip install flake8 mypy pydantic types-requests types-redis ruff - - uses: pre-commit/action@v3.0.0 - with: - extra_args: --files ./src/* diff --git a/.github/workflows/run_test_and_gen_report.yml b/.github/workflows/run_test_and_gen_report.yml index caa9eaf7..8cb28953 100644 --- a/.github/workflows/run_test_and_gen_report.yml +++ b/.github/workflows/run_test_and_gen_report.yml @@ -6,6 +6,10 @@ on: - 'v*.*.*' workflow_dispatch: +# Add permissions configuration +permissions: + contents: write + jobs: test: runs-on: ubuntu-latest @@ -76,10 +80,21 @@ jobs: cd tests poetry run python run_test.py - - name: Commit test results - uses: stefanzweifel/git-auto-commit-action@v4 - with: - commit_message: Add test results + - name: Commit and push report + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + run: | + git config --global user.name 'github-actions[bot]' + git config --global user.email 'github-actions[bot]@users.noreply.github.com' + + # Add the generated report + git add tests/compatible-models.mdx + + # Create commit with timestamp + git commit -m "docs: update compatibility test report [skip ci]" || echo "No changes to commit" + + # Push changes + git push "https://${GITHUB_ACTOR}:${GITHUB_TOKEN}@github.com/${GITHUB_REPOSITORY}.git" HEAD:${GITHUB_REF#refs/heads/} From 2d8da5c3fa50065b2e482899efc67f79b6830a6d Mon Sep 17 00:00:00 2001 From: Thomas Date: Mon, 4 Nov 2024 22:27:55 +0800 Subject: [PATCH 02/17] chore: Commit and push report --- .github/workflows/run_test_and_gen_report.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/run_test_and_gen_report.yml b/.github/workflows/run_test_and_gen_report.yml index 8cb28953..4b671542 100644 --- a/.github/workflows/run_test_and_gen_report.yml +++ b/.github/workflows/run_test_and_gen_report.yml @@ -93,8 +93,8 @@ jobs: # Create commit with timestamp git commit -m "docs: update compatibility test report [skip ci]" || echo "No changes to commit" - # Push changes - git push "https://${GITHUB_ACTOR}:${GITHUB_TOKEN}@github.com/${GITHUB_REPOSITORY}.git" HEAD:${GITHUB_REF#refs/heads/} + # Push changes to main branch + git push "https://${GITHUB_ACTOR}:${GITHUB_TOKEN}@github.com/${GITHUB_REPOSITORY}.git" HEAD:main From 7ec66162bfd3e3e7b028228a4c17d9d222af0884 Mon Sep 17 00:00:00 2001 From: Thomas Date: Mon, 4 Nov 2024 22:45:26 +0800 Subject: [PATCH 03/17] chore: Commit and push report --- .github/workflows/run_test_and_gen_report.yml | 16 +++++++++++++--- 1 file changed, 13 insertions(+), 3 deletions(-) diff --git a/.github/workflows/run_test_and_gen_report.yml b/.github/workflows/run_test_and_gen_report.yml index 4b671542..84faad9b 100644 --- a/.github/workflows/run_test_and_gen_report.yml +++ b/.github/workflows/run_test_and_gen_report.yml @@ -84,17 +84,27 @@ jobs: env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} run: | + # 首先切换到 main 分支 + git fetch origin main + git checkout main + git config --global user.name 'github-actions[bot]' git config --global user.email 'github-actions[bot]@users.noreply.github.com' - # Add the generated report - git add tests/compatible-models.mdx + # 检查文件是否存在 + ls -la tests/compatible-models.mdx || echo "Report file not found!" + + # 添加所有更改(包括新文件) + git add -A + + # 显示待提交的更改 + git status # Create commit with timestamp git commit -m "docs: update compatibility test report [skip ci]" || echo "No changes to commit" # Push changes to main branch - git push "https://${GITHUB_ACTOR}:${GITHUB_TOKEN}@github.com/${GITHUB_REPOSITORY}.git" HEAD:main + git push origin main From 6560d8fbcae07e453eb1608c797ce7c708af1812 Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" Date: Mon, 4 Nov 2024 14:50:24 +0000 Subject: [PATCH 04/17] docs: update compatibility test report [skip ci] --- poetry.lock | 10 +++++----- pyproject.toml | 1 + tests/compatible-models.mdx | 2 +- 3 files changed, 7 insertions(+), 6 deletions(-) diff --git a/poetry.lock b/poetry.lock index f481eccb..20e1df5f 100644 --- a/poetry.lock +++ b/poetry.lock @@ -3148,20 +3148,20 @@ diagrams = ["jinja2", "railroad-diagrams"] [[package]] name = "pytest" -version = "8.2.2" +version = "8.3.3" description = "pytest: simple powerful testing with Python" optional = false python-versions = ">=3.8" files = [ - {file = "pytest-8.2.2-py3-none-any.whl", hash = "sha256:c434598117762e2bd304e526244f67bf66bbd7b5d6cf22138be51ff661980343"}, - {file = "pytest-8.2.2.tar.gz", hash = "sha256:de4bb8104e201939ccdc688b27a89a7be2079b22e2bd2b07f806b6ba71117977"}, + {file = "pytest-8.3.3-py3-none-any.whl", hash = "sha256:a6853c7375b2663155079443d2e45de913a911a11d669df02a50814944db57b2"}, + {file = "pytest-8.3.3.tar.gz", hash = "sha256:70b98107bd648308a7952b06e6ca9a50bc660be218d53c257cc1fc94fda10181"}, ] [package.dependencies] colorama = {version = "*", markers = "sys_platform == \"win32\""} iniconfig = "*" packaging = "*" -pluggy = ">=1.5,<2.0" +pluggy = ">=1.5,<2" [package.extras] dev = ["argcomplete", "attrs (>=19.2)", "hypothesis (>=3.56)", "mock", "pygments (>=2.7.2)", "requests", "setuptools", "xmlschema"] @@ -4412,4 +4412,4 @@ test = ["big-O", "importlib-resources", "jaraco.functools", "jaraco.itertools", [metadata] lock-version = "2.0" python-versions = "^3.11" -content-hash = "7fc0b8b9178cce25f4d340bd469bab0a89a15bb4311a4de44850925e5de0e7e4" +content-hash = "ca1956c058226f2d4fb2164477d507540a568ff7b1760ebd7e8bfcf30b95ac66" diff --git a/pyproject.toml b/pyproject.toml index 2ff03bc0..a04d8d7d 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -50,6 +50,7 @@ moralis = "^0.1.49" pytest-asyncio = "^0.23.8" feedparser = "^6.0.11" jinja2 = "^3.1.4" +pytest = "^8.3.3" [tool.poetry.group.dev.dependencies] ruff = "^0.4.1" diff --git a/tests/compatible-models.mdx b/tests/compatible-models.mdx index 8a9789c2..601bba89 100644 --- a/tests/compatible-models.mdx +++ b/tests/compatible-models.mdx @@ -38,5 +38,5 @@ Learn more: | Name | Score (out of 100) | |------|-------------------| -| gpt-4o-mini | 100 | +| gpt-4o-mini | 96 | | gpt-4o | 100 | \ No newline at end of file From 2195366705943223d730e4b964c95795976b1f0f Mon Sep 17 00:00:00 2001 From: Thomas Date: Tue, 5 Nov 2024 11:21:05 +0800 Subject: [PATCH 05/17] fix: gemini error --- poetry.lock | 53 +++++++++++++++++++++++++------------------------- pyproject.toml | 3 +-- 2 files changed, 28 insertions(+), 28 deletions(-) diff --git a/poetry.lock b/poetry.lock index 20e1df5f..a485aed8 100644 --- a/poetry.lock +++ b/poetry.lock @@ -972,13 +972,13 @@ files = [ [[package]] name = "google-ai-generativelanguage" -version = "0.6.4" +version = "0.6.6" description = "Google Ai Generativelanguage API client library" optional = false python-versions = ">=3.7" files = [ - {file = "google-ai-generativelanguage-0.6.4.tar.gz", hash = "sha256:1750848c12af96cb24ae1c3dd05e4bfe24867dc4577009ed03e1042d8421e874"}, - {file = "google_ai_generativelanguage-0.6.4-py3-none-any.whl", hash = "sha256:730e471aa549797118fb1c88421ba1957741433ada575cf5dd08d3aebf903ab1"}, + {file = "google-ai-generativelanguage-0.6.6.tar.gz", hash = "sha256:1739f035caeeeca5c28f887405eec8690f3372daf79fecf26454a97a4f1733a8"}, + {file = "google_ai_generativelanguage-0.6.6-py3-none-any.whl", hash = "sha256:59297737931f073d55ce1268dcc6d95111ee62850349d2b6cde942b16a4fca5c"}, ] [package.dependencies] @@ -1014,13 +1014,13 @@ grpcio-gcp = ["grpcio-gcp (>=0.2.2,<1.0.dev0)"] [[package]] name = "google-api-python-client" -version = "2.129.0" +version = "2.151.0" description = "Google API Client Library for Python" optional = false python-versions = ">=3.7" files = [ - {file = "google-api-python-client-2.129.0.tar.gz", hash = "sha256:984cc8cc8eb4923468b1926d2b8effc5b459a4dda3c845896eb87c153b28ef84"}, - {file = "google_api_python_client-2.129.0-py2.py3-none-any.whl", hash = "sha256:d50f7e2dfdbb7fc2732f6a0cba1c54d7bb676390679526c6bb628c901e43ec86"}, + {file = "google_api_python_client-2.151.0-py2.py3-none-any.whl", hash = "sha256:4427b2f47cd88b0355d540c2c52215f68c337f3bc9d6aae1ceeae4525977504c"}, + {file = "google_api_python_client-2.151.0.tar.gz", hash = "sha256:a9d26d630810ed4631aea21d1de3e42072f98240aaf184a8a1a874a371115034"}, ] [package.dependencies] @@ -1286,16 +1286,16 @@ testing = ["pytest"] [[package]] name = "google-generativeai" -version = "0.5.4" +version = "0.7.2" description = "Google Generative AI High level API client library and tools." optional = false python-versions = ">=3.9" files = [ - {file = "google_generativeai-0.5.4-py3-none-any.whl", hash = "sha256:036d63ee35e7c8aedceda4f81c390a5102808af09ff3a6e57e27ed0be0708f3c"}, + {file = "google_generativeai-0.7.2-py3-none-any.whl", hash = "sha256:3117d1ebc92ee77710d4bc25ab4763492fddce9b6332eb25d124cf5d8b78b339"}, ] [package.dependencies] -google-ai-generativelanguage = "0.6.4" +google-ai-generativelanguage = "0.6.6" google-api-core = "*" google-api-python-client = "*" google-auth = ">=2.15.0" @@ -1754,13 +1754,13 @@ tenacity = ">=8.1.0,<8.4.0 || >8.4.0,<9.0.0" [[package]] name = "langchain-core" -version = "0.2.24" +version = "0.2.38" description = "Building applications with LLMs through composability" optional = false python-versions = "<4.0,>=3.8.1" files = [ - {file = "langchain_core-0.2.24-py3-none-any.whl", hash = "sha256:9444fc082d21ef075d925590a684a73fe1f9688a3d90087580ec929751be55e7"}, - {file = "langchain_core-0.2.24.tar.gz", hash = "sha256:f2e3fa200b124e8c45d270da9bf836bed9c09532612c96ff3225e59b9a232f5a"}, + {file = "langchain_core-0.2.38-py3-none-any.whl", hash = "sha256:8a5729bc7e68b4af089af20eff44fe4e7ca21d0e0c87ec21cef7621981fd1a4a"}, + {file = "langchain_core-0.2.38.tar.gz", hash = "sha256:eb69dbedd344f2ee1f15bcea6c71a05884b867588fadc42d04632e727c1238f3"}, ] [package.dependencies] @@ -1773,21 +1773,22 @@ pydantic = [ ] PyYAML = ">=5.3" tenacity = ">=8.1.0,<8.4.0 || >8.4.0,<9.0.0" +typing-extensions = ">=4.7" [[package]] name = "langchain-google-genai" -version = "1.0.4" +version = "1.0.10" description = "An integration package connecting Google's genai package and LangChain" optional = false python-versions = "<4.0,>=3.9" files = [ - {file = "langchain_google_genai-1.0.4-py3-none-any.whl", hash = "sha256:e567cc401f8d629fce489ee031d258da7fa4b7da0abb8ed926d6990c650b659e"}, - {file = "langchain_google_genai-1.0.4.tar.gz", hash = "sha256:b6beccfe7504ce9f8778a8df23dc49239fd91cf076a55d61759a09fc1373ca26"}, + {file = "langchain_google_genai-1.0.10-py3-none-any.whl", hash = "sha256:333f5e10ebde45b519b7816d7129cb73c5f5e6ab0df9960fa2c9f339fe9d9068"}, + {file = "langchain_google_genai-1.0.10.tar.gz", hash = "sha256:d4465aaf50825c78663618259ceca60a323d33b1a09a791631ddc7bd4806f4ce"}, ] [package.dependencies] -google-generativeai = ">=0.5.2,<0.6.0" -langchain-core = ">=0.1.45,<0.3" +google-generativeai = ">=0.7.0,<0.8.0" +langchain-core = ">=0.2.33,<0.3" [package.extras] images = ["pillow (>=10.1.0,<11.0.0)"] @@ -3134,13 +3135,13 @@ tests = ["coverage[toml] (==5.0.4)", "pytest (>=6.0.0,<7.0.0)"] [[package]] name = "pyparsing" -version = "3.1.2" +version = "3.2.0" description = "pyparsing module - Classes and methods to define and execute parsing grammars" optional = false -python-versions = ">=3.6.8" +python-versions = ">=3.9" files = [ - {file = "pyparsing-3.1.2-py3-none-any.whl", hash = "sha256:f9db75911801ed778fe61bb643079ff86601aca99fcae6345aa67292038fb742"}, - {file = "pyparsing-3.1.2.tar.gz", hash = "sha256:a1bac0ce561155ecc3ed78ca94d3c9378656ad4c94c1270de543f621420f94ad"}, + {file = "pyparsing-3.2.0-py3-none-any.whl", hash = "sha256:93d9577b88da0bbea8cc8334ee8b918ed014968fd2ec383e868fb8afb1ccef84"}, + {file = "pyparsing-3.2.0.tar.gz", hash = "sha256:cbf74e27246d595d9a74b186b810f6fbb86726dbf3b9532efb343f6d7294fe9c"}, ] [package.extras] @@ -3148,20 +3149,20 @@ diagrams = ["jinja2", "railroad-diagrams"] [[package]] name = "pytest" -version = "8.3.3" +version = "8.2.2" description = "pytest: simple powerful testing with Python" optional = false python-versions = ">=3.8" files = [ - {file = "pytest-8.3.3-py3-none-any.whl", hash = "sha256:a6853c7375b2663155079443d2e45de913a911a11d669df02a50814944db57b2"}, - {file = "pytest-8.3.3.tar.gz", hash = "sha256:70b98107bd648308a7952b06e6ca9a50bc660be218d53c257cc1fc94fda10181"}, + {file = "pytest-8.2.2-py3-none-any.whl", hash = "sha256:c434598117762e2bd304e526244f67bf66bbd7b5d6cf22138be51ff661980343"}, + {file = "pytest-8.2.2.tar.gz", hash = "sha256:de4bb8104e201939ccdc688b27a89a7be2079b22e2bd2b07f806b6ba71117977"}, ] [package.dependencies] colorama = {version = "*", markers = "sys_platform == \"win32\""} iniconfig = "*" packaging = "*" -pluggy = ">=1.5,<2" +pluggy = ">=1.5,<2.0" [package.extras] dev = ["argcomplete", "attrs (>=19.2)", "hypothesis (>=3.56)", "mock", "pygments (>=2.7.2)", "requests", "setuptools", "xmlschema"] @@ -4412,4 +4413,4 @@ test = ["big-O", "importlib-resources", "jaraco.functools", "jaraco.itertools", [metadata] lock-version = "2.0" python-versions = "^3.11" -content-hash = "ca1956c058226f2d4fb2164477d507540a568ff7b1760ebd7e8bfcf30b95ac66" +content-hash = "4a8a65b9620240554e290e82169e5d2638867bb69a1d05f6e97811350e3b7edc" diff --git a/pyproject.toml b/pyproject.toml index a04d8d7d..a6309d96 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -29,7 +29,6 @@ sqlalchemy-utils = "^0.41.2" retrying = "^1.3.4" langchain-postgres = "0.0.9" psycopg2-binary = "^2.9.9" -langchain-google-genai = "^1.0.4" psycopg-binary = "^3.1.19" langchain-core = ">=0.2.9,<0.3" langgraph="0.1.1" @@ -50,7 +49,7 @@ moralis = "^0.1.49" pytest-asyncio = "^0.23.8" feedparser = "^6.0.11" jinja2 = "^3.1.4" -pytest = "^8.3.3" +langchain-google-genai = "<2.0.4" [tool.poetry.group.dev.dependencies] ruff = "^0.4.1" From 7efeefe2ceb3b3f8c3c39223c40d0d5f60ea7b2b Mon Sep 17 00:00:00 2001 From: Thomas Date: Tue, 5 Nov 2024 11:21:38 +0800 Subject: [PATCH 06/17] chore: add more model --- tests/run_test.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/tests/run_test.py b/tests/run_test.py index 3d6db347..9843679e 100644 --- a/tests/run_test.py +++ b/tests/run_test.py @@ -92,13 +92,17 @@ def run_all_tests(proprietary_models, opensource_models): if __name__ == "__main__": # Proprietary model list proprietary_models = [ + "gemini-1.5-flash", + "gemini-1.5-pro", "gpt-4o-mini", "gpt-4o", ] # Open source model list opensource_models = [ - # "llama3.2", + "llama3.2", + "mistral-nemo", + "darkmoon/olmo:7B-instruct-q6-k" ] run_all_tests(proprietary_models, opensource_models) From b1677a3b0b4e2da78939376fe68d881512d0db1a Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" Date: Tue, 5 Nov 2024 03:32:31 +0000 Subject: [PATCH 07/17] docs: update compatibility test report [skip ci] --- poetry.lock | 10 +++++----- pyproject.toml | 1 + tests/compatible-models.mdx | 4 +++- 3 files changed, 9 insertions(+), 6 deletions(-) diff --git a/poetry.lock b/poetry.lock index a485aed8..087ea502 100644 --- a/poetry.lock +++ b/poetry.lock @@ -3149,20 +3149,20 @@ diagrams = ["jinja2", "railroad-diagrams"] [[package]] name = "pytest" -version = "8.2.2" +version = "8.3.3" description = "pytest: simple powerful testing with Python" optional = false python-versions = ">=3.8" files = [ - {file = "pytest-8.2.2-py3-none-any.whl", hash = "sha256:c434598117762e2bd304e526244f67bf66bbd7b5d6cf22138be51ff661980343"}, - {file = "pytest-8.2.2.tar.gz", hash = "sha256:de4bb8104e201939ccdc688b27a89a7be2079b22e2bd2b07f806b6ba71117977"}, + {file = "pytest-8.3.3-py3-none-any.whl", hash = "sha256:a6853c7375b2663155079443d2e45de913a911a11d669df02a50814944db57b2"}, + {file = "pytest-8.3.3.tar.gz", hash = "sha256:70b98107bd648308a7952b06e6ca9a50bc660be218d53c257cc1fc94fda10181"}, ] [package.dependencies] colorama = {version = "*", markers = "sys_platform == \"win32\""} iniconfig = "*" packaging = "*" -pluggy = ">=1.5,<2.0" +pluggy = ">=1.5,<2" [package.extras] dev = ["argcomplete", "attrs (>=19.2)", "hypothesis (>=3.56)", "mock", "pygments (>=2.7.2)", "requests", "setuptools", "xmlschema"] @@ -4413,4 +4413,4 @@ test = ["big-O", "importlib-resources", "jaraco.functools", "jaraco.itertools", [metadata] lock-version = "2.0" python-versions = "^3.11" -content-hash = "4a8a65b9620240554e290e82169e5d2638867bb69a1d05f6e97811350e3b7edc" +content-hash = "12b02c526f80608f14fd5ca9de26986302203a66fc23a07f38c40b5c454a18ce" diff --git a/pyproject.toml b/pyproject.toml index a6309d96..b035dbe5 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -50,6 +50,7 @@ pytest-asyncio = "^0.23.8" feedparser = "^6.0.11" jinja2 = "^3.1.4" langchain-google-genai = "<2.0.4" +pytest = "^8.3.3" [tool.poetry.group.dev.dependencies] ruff = "^0.4.1" diff --git a/tests/compatible-models.mdx b/tests/compatible-models.mdx index 601bba89..23cd53fc 100644 --- a/tests/compatible-models.mdx +++ b/tests/compatible-models.mdx @@ -32,11 +32,13 @@ Learn more: | Name | Score (out of 100) | |------|-------------------| - +| llama3.2 | 84 || mistral-nemo | 92 || darkmoon/olmo:7B-instruct-q6-k | 0 | ### Proprietary Models | Name | Score (out of 100) | |------|-------------------| +| gemini-1.5-flash | 96 | +| gemini-1.5-pro | 92 | | gpt-4o-mini | 96 | | gpt-4o | 100 | \ No newline at end of file From 701964fc748b81963f0f387873b89ba7d467b940 Mon Sep 17 00:00:00 2001 From: Thomas Date: Tue, 5 Nov 2024 11:50:23 +0800 Subject: [PATCH 08/17] fix: gemini model based workflow --- openagent/conf/llm_provider.py | 6 +++--- openagent/ui/app.py | 7 ++++--- openagent/ui/profile.py | 4 ++-- openagent/workflows/workflow.py | 10 ++++++---- 4 files changed, 15 insertions(+), 12 deletions(-) diff --git a/openagent/conf/llm_provider.py b/openagent/conf/llm_provider.py index b660b3dd..81695e7a 100644 --- a/openagent/conf/llm_provider.py +++ b/openagent/conf/llm_provider.py @@ -11,7 +11,7 @@ from openagent.conf.env import settings -SUPPORTED_MODELS = { +SUPPORTED_OLLAMA_MODELS = { "llama3.2": {"name": "llama3.2", "supports_tools": True}, "mistral-nemo": {"name": "mistral-nemo", "supports_tools": True}, "darkmoon/olmo:7B-instruct-q6-k": {"name": "olmo", "supports_tools": False}, @@ -35,12 +35,12 @@ def get_available_ollama_providers() -> List[str]: for model in ollama_list["models"]: full_name = model["name"] # check if the full model name is in SUPPORTED_MODELS - if full_name in SUPPORTED_MODELS: + if full_name in SUPPORTED_OLLAMA_MODELS: available_models.append(full_name) else: # try to check the base name (without version tag) base_name = full_name.split(":")[0] - if base_name in SUPPORTED_MODELS: + if base_name in SUPPORTED_OLLAMA_MODELS: available_models.append(base_name) return available_models except Exception as e: diff --git a/openagent/ui/app.py b/openagent/ui/app.py index 418a8713..705ade4a 100644 --- a/openagent/ui/app.py +++ b/openagent/ui/app.py @@ -8,10 +8,11 @@ from langchain.schema.runnable.config import RunnableConfig from langchain_core.language_models import BaseChatModel from langchain_core.messages import HumanMessage +from langchain_ollama import ChatOllama from loguru import logger from openagent.conf.env import settings -from openagent.conf.llm_provider import SUPPORTED_MODELS, get_available_providers +from openagent.conf.llm_provider import SUPPORTED_OLLAMA_MODELS, get_available_providers from openagent.ui.profile import profile_name_to_provider_key, provider_to_profile from openagent.workflows.member import members from openagent.workflows.workflow import build_workflow @@ -108,9 +109,9 @@ async def on_message(message: cl.Message): # noqa msg = cl.Message(content="") agent_names = [member["name"] for member in members] - if hasattr(llm, "model"): + if hasattr(llm, "model") and isinstance(llm,ChatOllama): model_name = llm.model - supports_tools = SUPPORTED_MODELS.get(model_name, {}).get("supports_tools", False) + supports_tools = SUPPORTED_OLLAMA_MODELS.get(model_name, {}).get("supports_tools", False) else: supports_tools = True diff --git a/openagent/ui/profile.py b/openagent/ui/profile.py index 6e46d51b..98da5c19 100644 --- a/openagent/ui/profile.py +++ b/openagent/ui/profile.py @@ -1,6 +1,6 @@ import chainlit as cl -from openagent.conf.llm_provider import MODELS_ICONS, SUPPORTED_MODELS +from openagent.conf.llm_provider import MODELS_ICONS, SUPPORTED_OLLAMA_MODELS provider_key_to_profile_info = { "gpt-4o": { @@ -25,7 +25,7 @@ }, } -for model_key, model_info in SUPPORTED_MODELS.items(): +for model_key, model_info in SUPPORTED_OLLAMA_MODELS.items(): icon = MODELS_ICONS.get(model_info["name"], "/public/ollama.png") # type: ignore provider_key_to_profile_info[model_key] = { "name": model_info["name"], # type: ignore diff --git a/openagent/workflows/workflow.py b/openagent/workflows/workflow.py index be50f731..20eba928 100644 --- a/openagent/workflows/workflow.py +++ b/openagent/workflows/workflow.py @@ -3,6 +3,7 @@ from langchain_core.language_models import BaseChatModel from langchain_core.messages import BaseMessage, HumanMessage +from langchain_ollama import ChatOllama from langgraph.graph import END, StateGraph from loguru import logger @@ -11,7 +12,7 @@ from openagent.agents.fallback import build_fallback_agent from openagent.agents.feed_explore import build_feed_explorer_agent from openagent.agents.research_analyst import build_research_analyst_agent -from openagent.conf.llm_provider import SUPPORTED_MODELS +from openagent.conf.llm_provider import SUPPORTED_OLLAMA_MODELS class AgentState(TypedDict): @@ -29,14 +30,15 @@ async def run(state): def build_workflow(llm: BaseChatModel): - if hasattr(llm, "model"): + is_ollama = isinstance(llm, ChatOllama) + if hasattr(llm, "model") and is_ollama: model_name = llm.model else: return build_tool_workflow(llm) - supports_tools = SUPPORTED_MODELS.get(model_name, {}).get("supports_tools", False) + supports_tools = SUPPORTED_OLLAMA_MODELS.get(model_name, {}).get("supports_tools", False) - if not supports_tools: + if not supports_tools and is_ollama: return build_simple_workflow(llm) else: return build_tool_workflow(llm) From 07fc6ffe9f947d710c30bcd57b3ddae7e68bac35 Mon Sep 17 00:00:00 2001 From: Thomas Date: Tue, 5 Nov 2024 11:57:35 +0800 Subject: [PATCH 09/17] chore: Sort proprietary and open source models by score when converting results format. --- tests/run_test.py | 4 +++- tests/templates/compatible-models.mdx.j2 | 2 +- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/tests/run_test.py b/tests/run_test.py index 9843679e..2bd78386 100644 --- a/tests/run_test.py +++ b/tests/run_test.py @@ -38,16 +38,18 @@ def pytest_terminal_summary(self, terminalreporter, exitstatus, config): def generate_model_report(proprietary_results, opensource_results): - # Convert results format + # Convert results format and sort by score proprietary_models = [ {'name': model_name, 'score': score} for model_name, score in proprietary_results.items() ] + proprietary_models.sort(key=lambda x: x['score'], reverse=True) open_source_models = [ {'name': model_name, 'score': score} for model_name, score in opensource_results.items() ] + open_source_models.sort(key=lambda x: x['score'], reverse=True) # Set up template environment env = Environment(loader=FileSystemLoader('templates')) diff --git a/tests/templates/compatible-models.mdx.j2 b/tests/templates/compatible-models.mdx.j2 index 76abc58a..ea830ddd 100644 --- a/tests/templates/compatible-models.mdx.j2 +++ b/tests/templates/compatible-models.mdx.j2 @@ -32,7 +32,7 @@ Learn more: | Name | Score (out of 100) | |------|-------------------| -{% for model in open_source_models -%} +{%- for model in open_source_models %} | {{ model.name }} | {{ model.score }} | {%- endfor %} From ea18e6f2664de4531096f8607807da1800bd2f72 Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" Date: Tue, 5 Nov 2024 04:10:39 +0000 Subject: [PATCH 10/17] docs: update compatibility test report [skip ci] --- tests/compatible-models.mdx | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/tests/compatible-models.mdx b/tests/compatible-models.mdx index 23cd53fc..5ad35b54 100644 --- a/tests/compatible-models.mdx +++ b/tests/compatible-models.mdx @@ -32,13 +32,15 @@ Learn more: | Name | Score (out of 100) | |------|-------------------| -| llama3.2 | 84 || mistral-nemo | 92 || darkmoon/olmo:7B-instruct-q6-k | 0 | +| mistral-nemo | 96 | +| llama3.2 | 92 | +| darkmoon/olmo:7B-instruct-q6-k | 0 | ### Proprietary Models | Name | Score (out of 100) | |------|-------------------| +| gpt-4o | 100 | | gemini-1.5-flash | 96 | -| gemini-1.5-pro | 92 | -| gpt-4o-mini | 96 | -| gpt-4o | 100 | \ No newline at end of file +| gemini-1.5-pro | 96 | +| gpt-4o-mini | 96 | \ No newline at end of file From 5793bdc15159592f5bf6b030ff601e68f0f91864 Mon Sep 17 00:00:00 2001 From: Thomas Date: Tue, 5 Nov 2024 13:59:53 +0800 Subject: [PATCH 11/17] chore: add function support column --- .github/workflows/run_test_and_gen_report.yml | 2 +- tests/run_test.py | 68 +++++++++++-------- tests/templates/compatible-models.mdx.j2 | 12 ++-- 3 files changed, 46 insertions(+), 36 deletions(-) diff --git a/.github/workflows/run_test_and_gen_report.yml b/.github/workflows/run_test_and_gen_report.yml index 84faad9b..0867177a 100644 --- a/.github/workflows/run_test_and_gen_report.yml +++ b/.github/workflows/run_test_and_gen_report.yml @@ -101,7 +101,7 @@ jobs: git status # Create commit with timestamp - git commit -m "docs: update compatibility test report [skip ci]" || echo "No changes to commit" + git commit -m "docs: update compatibility test report" || echo "No changes to commit" # Push changes to main branch git push origin main diff --git a/tests/run_test.py b/tests/run_test.py index 2bd78386..e979b45e 100644 --- a/tests/run_test.py +++ b/tests/run_test.py @@ -4,6 +4,20 @@ import pytest from jinja2 import Environment, FileSystemLoader +# Global model configurations +PROPRIETARY_MODELS = [ + {"name": "gpt-4o-mini", "function_call_support": True}, + # {"name": "gpt-4o", "function_call_support": True}, + # {"name": "gemini-1.5-flash", "function_call_support": True}, + # {"name": "gemini-1.5-pro", "function_call_support": True}, +] + +OPENSOURCE_MODELS = [ + # {"name": "llama3.2", "function_call_support": True}, + # {"name": "mistral-nemo", "function_call_support": True}, + # {"name": "darkmoon/olmo:7B-instruct-q6-k", "function_call_support": False} +] + class TestStats: def __init__(self): @@ -38,17 +52,28 @@ def pytest_terminal_summary(self, terminalreporter, exitstatus, config): def generate_model_report(proprietary_results, opensource_results): + def bool_to_emoji(value): + return "✅" if value else "❌" + # Convert results format and sort by score - proprietary_models = [ - {'name': model_name, 'score': score} - for model_name, score in proprietary_results.items() - ] + proprietary_models = [] + for model in PROPRIETARY_MODELS: + if model['name'] in proprietary_results: + proprietary_models.append({ + 'name': model['name'], + 'score': proprietary_results[model['name']], + 'function_call_support': bool_to_emoji(model['function_call_support']) + }) proprietary_models.sort(key=lambda x: x['score'], reverse=True) - open_source_models = [ - {'name': model_name, 'score': score} - for model_name, score in opensource_results.items() - ] + open_source_models = [] + for model in OPENSOURCE_MODELS: + if model['name'] in opensource_results: + open_source_models.append({ + 'name': model['name'], + 'score': opensource_results[model['name']], + 'function_call_support': bool_to_emoji(model['function_call_support']) + }) open_source_models.sort(key=lambda x: x['score'], reverse=True) # Set up template environment @@ -75,36 +100,21 @@ def run_model_tests(model_name): return stats.calculate_model_score() -def run_all_tests(proprietary_models, opensource_models): +def run_all_tests(): proprietary_results = {} opensource_results = {} # Test proprietary models - for model in proprietary_models: - proprietary_results[model] = run_model_tests(model) + for model in PROPRIETARY_MODELS: + proprietary_results[model['name']] = run_model_tests(model['name']) # Test open source models - for model in opensource_models: - opensource_results[model] = run_model_tests(model) + for model in OPENSOURCE_MODELS: + opensource_results[model['name']] = run_model_tests(model['name']) # Generate report generate_model_report(proprietary_results, opensource_results) if __name__ == "__main__": - # Proprietary model list - proprietary_models = [ - "gemini-1.5-flash", - "gemini-1.5-pro", - "gpt-4o-mini", - "gpt-4o", - ] - - # Open source model list - opensource_models = [ - "llama3.2", - "mistral-nemo", - "darkmoon/olmo:7B-instruct-q6-k" - ] - - run_all_tests(proprietary_models, opensource_models) + run_all_tests() diff --git a/tests/templates/compatible-models.mdx.j2 b/tests/templates/compatible-models.mdx.j2 index ea830ddd..5bc8f70f 100644 --- a/tests/templates/compatible-models.mdx.j2 +++ b/tests/templates/compatible-models.mdx.j2 @@ -30,16 +30,16 @@ Learn more: -| Name | Score (out of 100) | -|------|-------------------| +| Name | Score (out of 100) | Function Call Support | +|------|-------------------|---------------------| {%- for model in open_source_models %} -| {{ model.name }} | {{ model.score }} | +| {{ model.name }} | {{ model.score }} | {{ model.function_call_support }} | {%- endfor %} ### Proprietary Models -| Name | Score (out of 100) | -|------|-------------------| +| Name | Score (out of 100) | Function Call Support | +|------|-------------------|---------------------| {%- for model in proprietary_models %} -| {{ model.name }} | {{ model.score }} | +| {{ model.name }} | {{ model.score }} | {{ model.function_call_support }} | {%- endfor %} \ No newline at end of file From edd5b1506e7e7a8ef6ec9118d3c6e6b8e4170dfe Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" Date: Tue, 5 Nov 2024 06:02:54 +0000 Subject: [PATCH 12/17] docs: update compatibility test report --- tests/compatible-models.mdx | 16 +++++----------- 1 file changed, 5 insertions(+), 11 deletions(-) diff --git a/tests/compatible-models.mdx b/tests/compatible-models.mdx index 5ad35b54..ce1e9065 100644 --- a/tests/compatible-models.mdx +++ b/tests/compatible-models.mdx @@ -30,17 +30,11 @@ Learn more: -| Name | Score (out of 100) | -|------|-------------------| -| mistral-nemo | 96 | -| llama3.2 | 92 | -| darkmoon/olmo:7B-instruct-q6-k | 0 | +| Name | Score (out of 100) | Function Call Support | +|------|-------------------|---------------------| ### Proprietary Models -| Name | Score (out of 100) | -|------|-------------------| -| gpt-4o | 100 | -| gemini-1.5-flash | 96 | -| gemini-1.5-pro | 96 | -| gpt-4o-mini | 96 | \ No newline at end of file +| Name | Score (out of 100) | Function Call Support | +|------|-------------------|---------------------| +| gpt-4o-mini | 100 | ✅ | \ No newline at end of file From cfdc811fbbf00859a39f8ead25f840a2f4224e3c Mon Sep 17 00:00:00 2001 From: Thomas Date: Tue, 5 Nov 2024 14:03:37 +0800 Subject: [PATCH 13/17] chore: comments --- .github/workflows/run_test_and_gen_report.yml | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/.github/workflows/run_test_and_gen_report.yml b/.github/workflows/run_test_and_gen_report.yml index 0867177a..97e7eb6b 100644 --- a/.github/workflows/run_test_and_gen_report.yml +++ b/.github/workflows/run_test_and_gen_report.yml @@ -84,20 +84,20 @@ jobs: env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} run: | - # 首先切换到 main 分支 + # Switch to main branch git fetch origin main git checkout main git config --global user.name 'github-actions[bot]' git config --global user.email 'github-actions[bot]@users.noreply.github.com' - # 检查文件是否存在 + # Check if file exists ls -la tests/compatible-models.mdx || echo "Report file not found!" - # 添加所有更改(包括新文件) + # Add all changes (including new files) git add -A - # 显示待提交的更改 + # Show pending changes git status # Create commit with timestamp From 7ce1410ce6d14cf916f165af7ec7e10f8ef73289 Mon Sep 17 00:00:00 2001 From: Thomas Date: Tue, 5 Nov 2024 14:04:22 +0800 Subject: [PATCH 14/17] chore: enable test for all models --- tests/run_test.py | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/tests/run_test.py b/tests/run_test.py index e979b45e..0bb9076b 100644 --- a/tests/run_test.py +++ b/tests/run_test.py @@ -7,15 +7,15 @@ # Global model configurations PROPRIETARY_MODELS = [ {"name": "gpt-4o-mini", "function_call_support": True}, - # {"name": "gpt-4o", "function_call_support": True}, - # {"name": "gemini-1.5-flash", "function_call_support": True}, - # {"name": "gemini-1.5-pro", "function_call_support": True}, + {"name": "gpt-4o", "function_call_support": True}, + {"name": "gemini-1.5-flash", "function_call_support": True}, + {"name": "gemini-1.5-pro", "function_call_support": True}, ] OPENSOURCE_MODELS = [ - # {"name": "llama3.2", "function_call_support": True}, - # {"name": "mistral-nemo", "function_call_support": True}, - # {"name": "darkmoon/olmo:7B-instruct-q6-k", "function_call_support": False} + {"name": "llama3.2", "function_call_support": True}, + {"name": "mistral-nemo", "function_call_support": True}, + {"name": "darkmoon/olmo:7B-instruct-q6-k", "function_call_support": False} ] From 223f6e73bdd9669ff2688dd99807b234b509ef7e Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" Date: Tue, 5 Nov 2024 06:13:04 +0000 Subject: [PATCH 15/17] docs: update compatibility test report --- tests/compatible-models.mdx | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/tests/compatible-models.mdx b/tests/compatible-models.mdx index ce1e9065..206d0661 100644 --- a/tests/compatible-models.mdx +++ b/tests/compatible-models.mdx @@ -32,9 +32,15 @@ Learn more: | Name | Score (out of 100) | Function Call Support | |------|-------------------|---------------------| +| mistral-nemo | 88 | ✅ | +| llama3.2 | 80 | ✅ | +| darkmoon/olmo:7B-instruct-q6-k | 0 | ❌ | ### Proprietary Models | Name | Score (out of 100) | Function Call Support | |------|-------------------|---------------------| -| gpt-4o-mini | 100 | ✅ | \ No newline at end of file +| gpt-4o-mini | 100 | ✅ | +| gemini-1.5-flash | 100 | ✅ | +| gpt-4o | 96 | ✅ | +| gemini-1.5-pro | 96 | ✅ | \ No newline at end of file From dde7475c687784e9d5d5f9ea4d73e1a1259e99ab Mon Sep 17 00:00:00 2001 From: Thomas Date: Tue, 5 Nov 2024 14:28:35 +0800 Subject: [PATCH 16/17] chore: ci --- .github/workflows/build-docker-images.yml | 121 ++++++++++++++++++++++ .github/workflows/ci.yml | 19 ++++ 2 files changed, 140 insertions(+) create mode 100644 .github/workflows/build-docker-images.yml create mode 100644 .github/workflows/ci.yml diff --git a/.github/workflows/build-docker-images.yml b/.github/workflows/build-docker-images.yml new file mode 100644 index 00000000..b81cd1eb --- /dev/null +++ b/.github/workflows/build-docker-images.yml @@ -0,0 +1,121 @@ +name: build & push docker images + +on: + push: + branches: + - main + tags: + - "*" + pull_request: + +jobs: + build: + runs-on: + - self-hosted + - ${{ matrix.platform }} + strategy: + fail-fast: false + matrix: + platform: + - linux/amd64 + # - linux/arm64 # Cannot build frontend (install apk packages) within acceptable time + steps: + - name: Prepare + run: | + platform=${{ matrix.platform }} + echo "PLATFORM_PAIR=${platform//\//-}" >> $GITHUB_ENV + - name: Checkout + uses: actions/checkout@v4 + - name: Set up Docker Buildx + uses: docker/setup-buildx-action@v3 + with: + platforms: ${{ matrix.platform }} + - name: Login to DockerHub + uses: docker/login-action@v3 + with: + username: ${{ secrets.DOCKERHUB_USERNAME }} + password: ${{ secrets.DOCKERHUB_TOKEN }} + - name: Docker meta + id: meta + uses: docker/metadata-action@v5 + with: + images: rss3/openagent + - name: Build and push by digest + id: build + uses: docker/build-push-action@v5 + with: + context: . + platforms: ${{ matrix.platform }} + labels: ${{ steps.meta.outputs.labels }} + outputs: type=image,name=rss3/openagent,push-by-digest=true,name-canonical=true,push=true + - name: Export digest + run: | + mkdir -p /tmp/digests + digest="${{ steps.build.outputs.digest }}" + touch "/tmp/digests/${digest#sha256:}" + - name: Upload digest + uses: actions/upload-artifact@v4 + with: + name: digests-${{ env.PLATFORM_PAIR }} + path: /tmp/digests/* + if-no-files-found: error + retention-days: 1 + + merge: + runs-on: ubuntu-latest + permissions: + contents: read + packages: write + id-token: write + needs: + - build + steps: + - name: Download digests + uses: actions/download-artifact@v4 + with: + path: /tmp/digests + pattern: digests-* + merge-multiple: true + - name: Set up Docker Buildx + uses: docker/setup-buildx-action@v3 + + - name: Log in to the Container registry + uses: docker/login-action@v3 + with: + registry: ghcr.io + username: ${{ github.actor }} + password: ${{ github.token }} + + - name: Login to DockerHub + uses: docker/login-action@v3 + with: + username: ${{ secrets.DOCKERHUB_USERNAME }} + password: ${{ secrets.DOCKERHUB_TOKEN }} + + - name: Extract metadata (tags, labels) for Docker + id: meta + uses: docker/metadata-action@v5 + with: + images: | + rss3/openagent + ghcr.io/${{ github.repository }} + tags: | + type=raw,value=latest,enable={{is_default_branch}} + type=raw,value=${{ matrix.arch }},enable={{is_default_branch}} + type=ref,event=tag + type=ref,event=branch + type=ref,event=pr + type=sha,prefix={{branch}}-,enable=${{ !startsWith(github.ref, 'refs/tags') && github.event_name != 'pull_request' }},event=branch + + - name: Create manifest list and push + working-directory: /tmp/digests + run: | + if [ ${{ github.event_name }} == 'pull_request' ]; then + ARGS="--dry-run" + fi + docker buildx imagetools create $(jq -cr '.tags | map("-t " + .) | join(" ")' <<< "$DOCKER_METADATA_OUTPUT_JSON") \ + $(printf 'rss3/openagent@sha256:%s ' *) $ARGS + - name: Inspect image + if: github.event_name != 'pull_request' + run: | + docker buildx imagetools inspect rss3/openagent:${{ steps.meta.outputs.version }} diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml new file mode 100644 index 00000000..46b753d2 --- /dev/null +++ b/.github/workflows/ci.yml @@ -0,0 +1,19 @@ +name: backend code quality + +on: + pull_request: + push: + branches: + - "main" + - "prod" + +jobs: + pre-commit: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v3 + - uses: actions/setup-python@v3 + - run: pip install flake8 mypy pydantic types-requests types-redis ruff + - uses: pre-commit/action@v3.0.0 + with: + extra_args: --files ./src/* From 99bbd06c3e4e5b4047526b57d38da207054cb10d Mon Sep 17 00:00:00 2001 From: Thomas Date: Tue, 5 Nov 2024 14:31:55 +0800 Subject: [PATCH 17/17] chore: disable olmo --- tests/run_test.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/run_test.py b/tests/run_test.py index 0bb9076b..ae4788d8 100644 --- a/tests/run_test.py +++ b/tests/run_test.py @@ -15,7 +15,7 @@ OPENSOURCE_MODELS = [ {"name": "llama3.2", "function_call_support": True}, {"name": "mistral-nemo", "function_call_support": True}, - {"name": "darkmoon/olmo:7B-instruct-q6-k", "function_call_support": False} + # {"name": "darkmoon/olmo:7B-instruct-q6-k", "function_call_support": False} ]