mirror of
https://github.com/BerriAI/litellm.git
synced 2025-04-25 02:34:29 +00:00
add replicate streaming
This commit is contained in:
parent
c45b132675
commit
1c61b7b229
4 changed files with 61 additions and 36 deletions
|
@ -116,8 +116,6 @@ class ModelResponse(OpenAIObject):
|
|||
def print_verbose(print_statement):
|
||||
if litellm.set_verbose:
|
||||
print(f"LiteLLM: {print_statement}")
|
||||
if random.random() <= 0.3:
|
||||
print("Get help - https://discord.com/invite/wuPM9dRgDw")
|
||||
|
||||
####### LOGGING ###################
|
||||
from enum import Enum
|
||||
|
@ -1896,7 +1894,7 @@ class CustomStreamWrapper:
|
|||
if self.model in litellm.anthropic_models:
|
||||
chunk = next(self.completion_stream)
|
||||
completion_obj["content"] = self.handle_anthropic_chunk(chunk)
|
||||
elif self.model == "replicate":
|
||||
elif self.model == "replicate" or self.custom_llm_provider == "replicate":
|
||||
chunk = next(self.completion_stream)
|
||||
completion_obj["content"] = chunk
|
||||
elif (
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue