Skip to content

Commit

Permalink
remove test
Browse files Browse the repository at this point in the history
  • Loading branch information
ZanSara committed Sep 11, 2023
1 parent 2edf85f commit 2ae1fb6
Showing 1 changed file with 0 additions and 14 deletions.
14 changes: 0 additions & 14 deletions e2e/preview/components/test_gpt35_generator.py
Original file line number Diff line number Diff line change
Expand Up @@ -37,20 +37,6 @@ def test_gpt35_generator_run_wrong_model_name():
component.run(prompts=["What's the capital of France?"])


@pytest.mark.skipif(
not os.environ.get("OPENAI_API_KEY", None),
reason="Export an env var called OPENAI_API_KEY containing the OpenAI API key to run this test.",
)
def test_gpt35_generator_run_above_context_length():
component = GPT35Generator(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.",
):
component.run(prompts=["What's the capital of France? " * 10_000])


@pytest.mark.skipif(
not os.environ.get("OPENAI_API_KEY", None),
reason="Export an env var called OPENAI_API_KEY containing the OpenAI API key to run this test.",
Expand Down

0 comments on commit 2ae1fb6

Please sign in to comment.