Skip to content

Commit

Permalink
openai[patch]: fix Azure LLM test (#29302)
Browse files Browse the repository at this point in the history
The tokens I get are:
```
['', '\n\n', 'The', ' sun', ' was', ' setting', ' over', ' the', ' horizon', ',', ' casting', '']
```
so possibly an extra empty token is included in the output.

lmk @efriis if we should look into this further.
  • Loading branch information
ccurme authored Jan 19, 2025
1 parent 6b249a0 commit c20f741
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -148,7 +148,7 @@ def test_openai_streaming_callback() -> None:
verbose=True,
)
llm.invoke("Write me a sentence with 100 words.")
assert callback_handler.llm_streams == 11
assert callback_handler.llm_streams == 12


@pytest.mark.scheduled
Expand All @@ -171,5 +171,5 @@ async def test_openai_async_streaming_callback() -> None:
verbose=True,
)
result = await llm.agenerate(["Write me a sentence with 100 words."])
assert callback_handler.llm_streams == 11
assert callback_handler.llm_streams == 12
assert isinstance(result, LLMResult)

0 comments on commit c20f741

Please sign in to comment.