fix tg computer

This commit is contained in:
ishaan-jaff 2023-08-17 18:01:12 -07:00
parent 068930f81a
commit 2ea36c49e3
2 changed files with 6 additions and 3 deletions

View file

@ -392,7 +392,7 @@ def get_optional_params(
if stream:
optional_params["stream"] = stream
return optional_params
elif custom_llm_provider == "together_ai":
elif custom_llm_provider == "together_ai" or ("togethercomputer" in model):
if stream:
optional_params["stream_tokens"] = stream
if temperature != 1:
@ -897,7 +897,7 @@ class CustomStreamWrapper:
elif self.model == "replicate":
chunk = next(self.completion_stream)
completion_obj["content"] = chunk
elif self.model == "together_ai":
elif (self.model == "together_ai") or ("togethercomputer" in self.model):
chunk = next(self.completion_stream)
text_data = self.handle_together_ai_chunk(chunk)
if text_data == "":