remove test (#5753)

This commit is contained in:
ZanSara 2023-09-12 15:04:36 +01:00 committed by GitHub
parent 869f69d0d1
commit 7194343458
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -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.",