From cb39a3f1c4e36c6a268686e59cfd9def213fde1c Mon Sep 17 00:00:00 2001 From: "tao.jun" <76894920+mini-tiger@users.noreply.github.com> Date: Mon, 5 Feb 2024 20:49:23 +0800 Subject: [PATCH 1/3] Update test_toolcall.py Add openai version notes Former-commit-id: 9ea4ab214e64f73ec902e76b82fc42419571fd66 --- tests/test_toolcall.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/test_toolcall.py b/tests/test_toolcall.py index ba9bedf7..8c706429 100644 --- a/tests/test_toolcall.py +++ b/tests/test_toolcall.py @@ -3,7 +3,7 @@ import os from typing import Sequence from openai import OpenAI - +# pip install openai >= 1.3.0 os.environ["OPENAI_BASE_URL"] = "http://192.168.0.1:8000/v1" os.environ["OPENAI_API_KEY"] = "0" From 5f3d8c514b8b358c6b5837f391c0526aa71c607c Mon Sep 17 00:00:00 2001 From: hoshi-hiyouga Date: Mon, 5 Feb 2024 22:50:43 +0800 Subject: [PATCH 2/3] Update test_toolcall.py Former-commit-id: 97bcae546ab80737a906e5e28953f41b657f6c99 --- tests/test_toolcall.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/tests/test_toolcall.py b/tests/test_toolcall.py index 8c706429..74946d40 100644 --- a/tests/test_toolcall.py +++ b/tests/test_toolcall.py @@ -3,10 +3,11 @@ import os from typing import Sequence from openai import OpenAI -# pip install openai >= 1.3.0 +from transformers.utils.versions import require_version os.environ["OPENAI_BASE_URL"] = "http://192.168.0.1:8000/v1" os.environ["OPENAI_API_KEY"] = "0" +require_version("openai>=1.5.0", "To fix: pip install openai>=1.5.0") def calculate_gpa(grades: Sequence[str], hours: Sequence[int]) -> float: From 00418012bdbd74b5664e771283adc81023abbe2d Mon Sep 17 00:00:00 2001 From: hoshi-hiyouga Date: Mon, 5 Feb 2024 22:51:03 +0800 Subject: [PATCH 3/3] Update test_toolcall.py Former-commit-id: f50a684a9d6fc2351436d3d7020dc84bc1553a5d --- tests/test_toolcall.py | 1 + 1 file changed, 1 insertion(+) diff --git a/tests/test_toolcall.py b/tests/test_toolcall.py index 74946d40..666a33e7 100644 --- a/tests/test_toolcall.py +++ b/tests/test_toolcall.py @@ -5,6 +5,7 @@ from typing import Sequence from openai import OpenAI from transformers.utils.versions import require_version + os.environ["OPENAI_BASE_URL"] = "http://192.168.0.1:8000/v1" os.environ["OPENAI_API_KEY"] = "0" require_version("openai>=1.5.0", "To fix: pip install openai>=1.5.0")