mirror of
https://github.com/BerriAI/litellm.git
synced 2025-04-27 03:34:10 +00:00
(test) do nothing if token==None in stream chunk
This commit is contained in:
parent
e527a45ffc
commit
30fcc1f9a0
1 changed files with 4 additions and 1 deletions
|
@ -142,7 +142,10 @@ def test_get_response_non_openai_streaming():
|
|||
output = ""
|
||||
i = 0
|
||||
async for chunk in response:
|
||||
token = chunk["choices"][0]["delta"].get("content", "")
|
||||
token = chunk["choices"][0]["delta"].get("content", None)
|
||||
if token == None:
|
||||
continue
|
||||
print(token)
|
||||
output += token
|
||||
print(f"output: {output}")
|
||||
assert output is not None, "output cannot be None."
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue