mirror of
https://github.com/BerriAI/litellm.git
synced 2025-04-26 11:14:04 +00:00
add customstreapwrapper for openai streaming
This commit is contained in:
parent
0158e12701
commit
69f9c40d80
2 changed files with 9 additions and 1 deletions
|
@ -1623,6 +1623,9 @@ class CustomStreamWrapper:
|
|||
elif self.model in litellm.open_ai_text_completion_models:
|
||||
chunk = next(self.completion_stream)
|
||||
completion_obj["content"] = self.handle_openai_text_completion_chunk(chunk)
|
||||
else: # openai chat/azure models
|
||||
chunk = next(self.completion_stream)
|
||||
completion_obj['content'] = chunk['choices']['delta']
|
||||
# LOGGING
|
||||
self.logging_obj(completion_obj["content"])
|
||||
# return this for all models
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue