mirror of
https://github.com/BerriAI/litellm.git
synced 2025-04-26 03:04:13 +00:00
improvements to streaming
This commit is contained in:
parent
63f3386dd0
commit
5470bc6fd0
4 changed files with 5 additions and 8 deletions
|
@ -172,6 +172,7 @@ def validate_last_format(chunk):
|
|||
def streaming_format_tests(idx, chunk):
|
||||
extracted_chunk = ""
|
||||
finished = False
|
||||
print(f"chunk: {chunk}")
|
||||
if idx == 0: # ensure role assistant is set
|
||||
validate_first_format(chunk=chunk)
|
||||
role = chunk["choices"][0]["delta"]["role"]
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue