streaming for amazon titan bedrock

This commit is contained in:
ishaan-jaff 2023-09-16 09:57:16 -07:00
parent 93fbe4a733
commit c714372b9d
4 changed files with 82 additions and 44 deletions

View file

@ -781,10 +781,12 @@ def completion(
litellm_params=litellm_params,
logger_fn=logger_fn,
encoding=encoding,
logging_obj=logging
logging_obj=logging,
stream=stream,
)
if "stream" in optional_params and optional_params["stream"] == True: ## [BETA]
if stream == True:
# don't try to access stream object,
response = CustomStreamWrapper(
iter(model_response), model, custom_llm_provider="bedrock", logging_obj=logging