Skip to content

Commit

Permalink
s
Browse files Browse the repository at this point in the history
  • Loading branch information
Anmol6 committed Dec 1, 2023
1 parent 9a261d8 commit 56ae384
Showing 1 changed file with 0 additions and 19 deletions.
19 changes: 0 additions & 19 deletions tests/openai/test_modes.py
Original file line number Diff line number Diff line change
Expand Up @@ -42,25 +42,6 @@ def test_tool_call():
assert user.age == 25


def test_json_mode():
response = client.chat.completions.create(
model="gpt-3.5-turbo-1106",
response_format={"type": "json_object"},
messages=[
{
"role": "system",
"content": f"Make sure that your response to any message matchs the json_schema below, do not deviate at all: \n{UserExtract.model_json_schema()['properties']}",
},
{
"role": "user",
"content": "Extract jason is 25 years old",
},
],
)
user = UserExtract.from_response(response, mode=Mode.JSON)
assert user.name.lower() == "jason"
assert user.age == 25

def test_json_mode():
response = client.chat.completions.create(
model="gpt-3.5-turbo-1106",
Expand Down

0 comments on commit 56ae384

Please sign in to comment.