diff --git a/tests/llm/test_openai/evals/test_classification_enums.py b/tests/llm/test_openai/evals/test_classification_enums.py index a639c05c6..e42ec3305 100644 --- a/tests/llm/test_openai/evals/test_classification_enums.py +++ b/tests/llm/test_openai/evals/test_classification_enums.py @@ -37,7 +37,7 @@ class SinglePrediction(BaseModel): @pytest.mark.parametrize("model, data, mode", product(models, data, modes)) def test_classification(model, data, mode, client): - client = instructor.patch(client, mode=mode) + client = instructor.from_openai(client, mode=mode) if mode == instructor.Mode.JSON and model in {"gpt-3.5-turbo", "gpt-4"}: pytest.skip( @@ -88,7 +88,7 @@ class MultiClassPrediction(BaseModel): @pytest.mark.parametrize("model, data, mode", product(models, data, modes)) def test_multi_classify(model, data, mode, client): - client = instructor.patch(client, mode=mode) + client = instructor.from_openai(client, mode=mode) if (mode, model) in { (Mode.JSON, "gpt-3.5-turbo"), diff --git a/tests/llm/test_openai/evals/test_classification_literals.py b/tests/llm/test_openai/evals/test_classification_literals.py index 51496dbac..76252ab85 100644 --- a/tests/llm/test_openai/evals/test_classification_literals.py +++ b/tests/llm/test_openai/evals/test_classification_literals.py @@ -27,7 +27,7 @@ class SinglePrediction(BaseModel): @pytest.mark.parametrize("model, data, mode", product(models, data, modes)) @pytest.mark.asyncio async def test_classification(model, data, mode, aclient): - client = instructor.patch(aclient, mode=mode) + client = instructor.from_openai(aclient, mode=mode) if mode == instructor.Mode.JSON and model in {"gpt-3.5-turbo", "gpt-4"}: pytest.skip( @@ -72,7 +72,7 @@ class MultiClassPrediction(BaseModel): @pytest.mark.parametrize("model, data, mode", product(models, data, modes)) @pytest.mark.asyncio async def test_multi_classify(model, data, mode, aclient): - client = instructor.patch(aclient, mode=mode) + client = instructor.from_openai(aclient, mode=mode) if (mode, model) in { (Mode.JSON, "gpt-3.5-turbo"), diff --git a/tests/llm/test_openai/util.py b/tests/llm/test_openai/util.py index e66433cd8..7c515f948 100644 --- a/tests/llm/test_openai/util.py +++ b/tests/llm/test_openai/util.py @@ -1,6 +1,6 @@ import instructor -models = ["gpt-4-turbo-preview"] +models = ["gpt-4-turbo"] modes = [ instructor.Mode.TOOLS, ]