From 329aad023b77a7252f702f80cb679e2447492f2f Mon Sep 17 00:00:00 2001 From: Jason Liu Date: Tue, 12 Dec 2023 22:48:34 -0500 Subject: [PATCH] add md_mode --- tests/openai/test_patch.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/tests/openai/test_patch.py b/tests/openai/test_patch.py index 5619c30..5d353fc 100644 --- a/tests/openai/test_patch.py +++ b/tests/openai/test_patch.py @@ -15,7 +15,7 @@ class UserExtract(BaseModel): age: int -@pytest.mark.parametrize("mode", [Mode.FUNCTIONS, Mode.JSON, Mode.TOOLS]) +@pytest.mark.parametrize("mode", [Mode.FUNCTIONS, Mode.JSON, Mode.TOOLS, Mode.MD_JSON]) def test_runmodel(mode): client = instructor.patch(OpenAI(), mode=mode) model = client.chat.completions.create( @@ -34,7 +34,7 @@ def test_runmodel(mode): ), "The raw response should be available from OpenAI" -@pytest.mark.parametrize("mode", [Mode.FUNCTIONS, Mode.JSON, Mode.TOOLS]) +@pytest.mark.parametrize("mode", [Mode.FUNCTIONS, Mode.JSON, Mode.TOOLS, Mode.MD_JSON]) @pytest.mark.asyncio async def test_runmodel_async(mode): aclient = instructor.patch(AsyncOpenAI(), mode=mode) @@ -66,7 +66,7 @@ class UserExtractValidated(BaseModel): return v -@pytest.mark.parametrize("mode", [Mode.FUNCTIONS, Mode.JSON]) +@pytest.mark.parametrize("mode", [Mode.FUNCTIONS, Mode.JSON, Mode.MD_JSON]) def test_runmodel_validator(mode): client = instructor.patch(OpenAI(), mode=mode) model = client.chat.completions.create( @@ -84,7 +84,7 @@ def test_runmodel_validator(mode): ), "The raw response should be available from OpenAI" -@pytest.mark.parametrize("mode", [Mode.FUNCTIONS, Mode.JSON]) +@pytest.mark.parametrize("mode", [Mode.FUNCTIONS, Mode.JSON, Mode.MD_JSON]) @pytest.mark.asyncio async def test_runmodel_async_validator(mode): aclient = instructor.patch(AsyncOpenAI(), mode=mode)