Skip to content

Commit

Permalink
update test failure reasons
Browse files Browse the repository at this point in the history
Signed-off-by: Jeffrey Martin <[email protected]>
  • Loading branch information
jmartin-tech committed Feb 26, 2025
1 parent fa823b0 commit bcca18b
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions tests/generators/test_openai_compatible.py
Original file line number Diff line number Diff line change
Expand Up @@ -132,12 +132,12 @@ def test_validate_call_model_token_restrictions(openai_compat_mocks):
generator._call_model(test_large_context)
assert "cannot be created" in str(
exc_info.value
), "a prompt large then max_tokens must raise exception"
), "a prompt larger than max_tokens must raise exception"

generator.context_len = large_context_len * 2
generator.max_tokens = generator.context_len - (large_context_len / 2)
generator._call_model("test values")
resp_body = json.loads(respx_mock.routes[0].calls[1].request.content)
assert (
resp_body["max_tokens"] < generator.context_len
), "request max_tokens must me less than model context length"
), "request max_tokens must be less than model context length"

0 comments on commit bcca18b

Please sign in to comment.