diff --git a/pyproject.toml b/pyproject.toml index f27d3bbb6..f0dd39a5b 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -89,7 +89,7 @@ dependencies = [ "colorama>=0.4.3", "tqdm>=4.67.1", "cohere>=5.16.0", - "openai>=1.45.0,<2", + "openai>=2.0,<3.0", "replicate>=0.8.3", "google-api-python-client>=2.0", "backoff>=2.1.1", @@ -187,4 +187,4 @@ filterwarnings = [ [tool.coverage.run] source = ["./garak"] -omit = ["tests/*"] \ No newline at end of file +omit = ["tests/*"] diff --git a/requirements.txt b/requirements.txt index 35a84f00e..62b6190f8 100644 --- a/requirements.txt +++ b/requirements.txt @@ -4,7 +4,7 @@ datasets>=3.0.0,<4.0 colorama>=0.4.3 tqdm>=4.67.1 cohere>=5.16.0 -openai>=1.45.0,<2 +openai>=2.0,<3.0 replicate>=0.8.3 google-api-python-client>=2.0 backoff>=2.1.1 diff --git a/tests/generators/test_openai.py b/tests/generators/test_openai.py index 61f189873..d45ede5df 100644 --- a/tests/generators/test_openai.py +++ b/tests/generators/test_openai.py @@ -28,7 +28,7 @@ def restore_env(): def test_openai_version(): - assert openai.__version__.split(".")[0] == "1" # expect openai module v1.x + assert openai.__version__.split(".")[0] == "2" # expect openai module v2.x @pytest.mark.usefixtures("set_fake_env")