mirror of
https://github.com/BerriAI/litellm.git
synced 2025-04-25 10:44:24 +00:00
fix(gemini.py): support streaming
This commit is contained in:
parent
b59e67f099
commit
b07677c6be
4 changed files with 67 additions and 13 deletions
|
@ -7622,7 +7622,9 @@ class CustomStreamWrapper:
|
|||
raise Exception("An unknown error occurred with the stream")
|
||||
model_response.choices[0].finish_reason = "stop"
|
||||
self.sent_last_chunk = True
|
||||
elif self.custom_llm_provider and self.custom_llm_provider == "vertex_ai":
|
||||
elif self.custom_llm_provider == "gemini":
|
||||
completion_obj["content"] = chunk.text
|
||||
elif self.custom_llm_provider and (self.custom_llm_provider == "vertex_ai"):
|
||||
try:
|
||||
# print(chunk)
|
||||
if hasattr(chunk, "text"):
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue