mirror of
https://github.com/hwchase17/langchain.git
synced 2025-06-23 15:19:33 +00:00
openai[patch]: relax Azure llm streaming callback test (#31319)
Effectively reverts https://github.com/langchain-ai/langchain/pull/29302, but check that counts are "less than" instead of equal to an expected count.
This commit is contained in:
parent
092697de60
commit
851fd438cf
@ -149,7 +149,7 @@ def test_openai_streaming_callback() -> None:
|
|||||||
verbose=True,
|
verbose=True,
|
||||||
)
|
)
|
||||||
llm.invoke("Write me a sentence with 100 words.")
|
llm.invoke("Write me a sentence with 100 words.")
|
||||||
assert callback_handler.llm_streams == 12
|
assert callback_handler.llm_streams < 15
|
||||||
|
|
||||||
|
|
||||||
@pytest.mark.scheduled
|
@pytest.mark.scheduled
|
||||||
@ -172,5 +172,5 @@ async def test_openai_async_streaming_callback() -> None:
|
|||||||
verbose=True,
|
verbose=True,
|
||||||
)
|
)
|
||||||
result = await llm.agenerate(["Write me a sentence with 100 words."])
|
result = await llm.agenerate(["Write me a sentence with 100 words."])
|
||||||
assert callback_handler.llm_streams == 12
|
assert callback_handler.llm_streams < 15
|
||||||
assert isinstance(result, LLMResult)
|
assert isinstance(result, LLMResult)
|
||||||
|
Loading…
Reference in New Issue
Block a user