mirror of
https://github.com/deepset-ai/haystack.git
synced 2025-11-09 14:23:43 +00:00
remove test (#5753)
This commit is contained in:
parent
869f69d0d1
commit
7194343458
@ -37,20 +37,6 @@ def test_gpt35_generator_run_wrong_model_name():
|
|||||||
component.run(prompts=["What's the capital of France?"])
|
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(
|
@pytest.mark.skipif(
|
||||||
not os.environ.get("OPENAI_API_KEY", None),
|
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.",
|
reason="Export an env var called OPENAI_API_KEY containing the OpenAI API key to run this test.",
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user