Skip to content

Commit 8ac6cf9

Browse files
committed
task: update openai library to 2.x (#1550)
2 parents 666ca84 + 19e970b commit 8ac6cf9

File tree

3 files changed

+4
-4
lines changed

3 files changed

+4
-4
lines changed

pyproject.toml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -89,7 +89,7 @@ dependencies = [
8989
"colorama>=0.4.3",
9090
"tqdm>=4.67.1",
9191
"cohere>=5.16.0",
92-
"openai>=1.45.0,<2",
92+
"openai>=2.0,<3.0",
9393
"replicate>=0.8.3",
9494
"google-api-python-client>=2.0",
9595
"backoff>=2.1.1",
@@ -187,4 +187,4 @@ filterwarnings = [
187187

188188
[tool.coverage.run]
189189
source = ["./garak"]
190-
omit = ["tests/*"]
190+
omit = ["tests/*"]

requirements.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ datasets>=3.0.0,<4.0
44
colorama>=0.4.3
55
tqdm>=4.67.1
66
cohere>=5.16.0
7-
openai>=1.45.0,<2
7+
openai>=2.0,<3.0
88
replicate>=0.8.3
99
google-api-python-client>=2.0
1010
backoff>=2.1.1

tests/generators/test_openai.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ def restore_env():
2828

2929

3030
def test_openai_version():
31-
assert openai.__version__.split(".")[0] == "1" # expect openai module v1.x
31+
assert openai.__version__.split(".")[0] == "2" # expect openai module v2.x
3232

3333

3434
@pytest.mark.usefixtures("set_fake_env")

0 commit comments

Comments
 (0)