Skip to content

Commit

Permalink
fix e2e
Browse files Browse the repository at this point in the history
  • Loading branch information
ZanSara committed Sep 8, 2023
1 parent a7e0f7a commit f7d15a3
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions e2e/preview/components/test_gpt35_generator.py
Original file line number Diff line number Diff line change
Expand Up @@ -49,10 +49,9 @@ def test_gpt35_generator_run_above_context_length(generator_class):
component = generator_class(api_key=os.environ.get("OPENAI_API_KEY"), n=1)
with pytest.raises(
openai.InvalidRequestError,
match="This model's maximum context length is 4097 tokens. However, your messages resulted in 70008 tokens. "
"Please reduce the length of the messages.",
match="However, your messages resulted in 35008 tokens. Please reduce the length of the messages.",
):
component.run(prompts=["What's the capital of France? " * 10_000])
component.run(prompts=["What's the capital of France? " * 5_000])


@pytest.mark.skipif(
Expand Down

0 comments on commit f7d15a3

Please sign in to comment.