diff --git a/.github/workflows/mypy.yml b/.github/workflows/mypy.yml index 2c9356e..8549811 100644 --- a/.github/workflows/mypy.yml +++ b/.github/workflows/mypy.yml @@ -22,7 +22,6 @@ jobs: max-parallel: 5 matrix: python-version: ["3.11"] - steps: - uses: actions/checkout@v3 - name: Set up Python ${{ matrix.python-version }} @@ -35,7 +34,6 @@ jobs: run: | curl -sSL https://install.python-poetry.org | python3 poetry lock - poetry install --with test -E chat - name: Type-checking package with mypy run: | # Run this mypy instance against our main package. diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index 06d7156..000c71a 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -39,11 +39,9 @@ jobs: - name: Install dependencies run: | poetry lock - poetry install --with test -E chat - name: Test with pytest env: # Or as an environment variable OPENAI_API_KEY: ${{ secrets.OPENAI_API_KEY }} REDIS_OM_URL: ${{ secrets.REDIS_OM_URL }} - TOGETHER_API_KEY: ${{ secrets.TOGETHER_API_KEY }} run: | poetry run pytest --cov=. --cov-report=xml diff --git a/haicosystem/envs/llm_engine.py b/haicosystem/envs/llm_engine.py index b7b6e01..7f2d558 100644 --- a/haicosystem/envs/llm_engine.py +++ b/haicosystem/envs/llm_engine.py @@ -31,7 +31,7 @@ from langchain_core.utils.input import get_color_mapping from langchain.callbacks.streaming_stdout import StreamingStdOutCallbackHandler -from langchain.chat_models import ChatOpenAI +from langchain_openai import ChatOpenAI from haicosystem.tools.utils import validate_outputs from haicosystem.envs.messages import SimulatedObservation, LangchainAgentAction diff --git a/poetry.lock b/poetry.lock index f268785..67074de 100644 --- a/poetry.lock +++ b/poetry.lock @@ -3065,40 +3065,40 @@ files = [ [[package]] name = "sotopia" -version = "0.0.9" +version = "0.0.11" description = "A platform for simulating and evaluating social interaction." optional = false -python-versions = ">=3.10, <3.13" -files = [] -develop = false +python-versions = "<3.13,>=3.10" +files = [ + {file = "sotopia-0.0.11-py3-none-any.whl", hash = "sha256:0fe27fb027b759d5a52ef91cec23a2858e844505a33ea09dadb2ab96f47934f8"}, + {file = "sotopia-0.0.11.tar.gz", hash = "sha256:38ff5660ec03abaa8a486813edc273b8bd229e884a769a76ef664c26f4c0d1a4"}, +] [package.dependencies] -absl-py = "^2.0.0" -beartype = "^0.14.0" -gin-config = "^0.5.0" -langchain = "~0.2.5" -langchain-openai = "~0.1.8" -litellm = "~1.23.12" +absl-py = ">=2.0.0,<3.0.0" +beartype = ">=0.14.0,<0.15.0" +gin-config = ">=0.5.0,<0.6.0" +langchain = ">=0.2.5,<0.3.0" +langchain-openai = ">=0.1.8,<0.2.0" +litellm = ">=1.23.12,<1.24.0" lxml = ">=4.9.3,<6.0.0" -openai = "^1.11.0" +openai = ">=1.11.0,<2.0.0" PettingZoo = "1.24.3" pydantic = "1.10.12" -redis-om = "^0.2.1" -rich = "^13.6.0" -together = "^0.2.4" +redis-om = ">=0.2.1,<0.3.0" +rich = ">=13.6.0,<14.0.0" +tabulate = ">=0.9.0,<0.10.0" +together = ">=0.2.4,<0.3.0" +xmltodict = ">=0.13.0,<0.14.0" [package.extras] -anthropic = ["anthropic (>=0.26,<0.31)"] +anthropic = ["anthropic (>=0.26,<0.29)"] chat = ["fastapi (>=0.109.2,<0.111.0)"] cohere = ["cohere (>=5.1.8,<6.0.0)"] examples = ["datasets (>=2.19.0,<3.0.0)", "pandas (>=2.1.1,<3.0.0)", "scipy (>=1.13.1,<2.0.0)", "torch (>=2.3.0,<3.0.0)", "transformers (>=4.41.0,<5.0.0)"] google-generativeai = ["google-generativeai (>=0.5.4,<0.8.0)"] groq = ["groq (>=0.4.2,<0.10.0)"] -[package.source] -type = "directory" -url = "../sotopia" - [[package]] name = "sqlalchemy" version = "2.0.31" @@ -3636,6 +3636,17 @@ files = [ {file = "wcwidth-0.2.13.tar.gz", hash = "sha256:72ea0c06399eb286d978fdedb6923a9eb47e1c486ce63e9b4e64fc18303972b5"}, ] +[[package]] +name = "xmltodict" +version = "0.13.0" +description = "Makes working with XML feel like you are working with JSON" +optional = false +python-versions = ">=3.4" +files = [ + {file = "xmltodict-0.13.0-py2.py3-none-any.whl", hash = "sha256:aa89e8fd76320154a40d19a0df04a4695fb9dc5ba977cbb68ab3e4eb225e7852"}, + {file = "xmltodict-0.13.0.tar.gz", hash = "sha256:341595a488e3e01a85a9d8911d8912fd922ede5fecc4dce437eb4b6c8d037e56"}, +] + [[package]] name = "yarl" version = "1.9.4" @@ -3757,4 +3768,4 @@ test = ["big-O", "importlib-resources", "jaraco.functools", "jaraco.itertools", [metadata] lock-version = "2.0" python-versions = ">=3.11, <3.13" -content-hash = "aa60b8d742a73a3b5215a0c4eac0194269e2c14838429e3ebb2c3e84f554d7d3" +content-hash = "57085177c011f6314db4ed3230efd773995abe58b77b79465ab149cdd0721f72" diff --git a/pyproject.toml b/pyproject.toml index c28166c..d781af6 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -8,7 +8,7 @@ packages = [{include = "haicosystem"}] [tool.poetry.dependencies] python = ">=3.11, <3.13" -sotopia = ">=0.0.6,<0.1.0" +sotopia = "0.0.11" types-requests = "^2.31" [tool.poetry.group.dev.dependencies] @@ -17,7 +17,7 @@ nbmake = "*" types-setuptools = "*" ruff = "*" #sotopia = { git = "https://github.com/sotopia-lab/sotopia.git", branch = "feature/ready-for-bridge" } -sotopia = { path = "../sotopia" } +#sotopia = { path = "../sotopia" } [tool.poetry.group.test.dependencies] pytest = "*"