Skip to content

Commit

Permalink
fix: patching
Browse files Browse the repository at this point in the history
  • Loading branch information
jxnl committed Apr 29, 2024
1 parent c9a8481 commit 973d4ae
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 5 deletions.
4 changes: 2 additions & 2 deletions tests/llm/test_openai/evals/test_classification_enums.py
Original file line number Diff line number Diff line change
Expand Up @@ -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(
Expand Down Expand Up @@ -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"),
Expand Down
4 changes: 2 additions & 2 deletions tests/llm/test_openai/evals/test_classification_literals.py
Original file line number Diff line number Diff line change
Expand Up @@ -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(
Expand Down Expand Up @@ -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"),
Expand Down
2 changes: 1 addition & 1 deletion tests/llm/test_openai/util.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import instructor

models = ["gpt-4-turbo-preview"]
models = ["gpt-4-turbo"]
modes = [
instructor.Mode.TOOLS,
]

0 comments on commit 973d4ae

Please sign in to comment.