From 45ae4a76e4a7e660f18371a15885af6d580de58f Mon Sep 17 00:00:00 2001 From: David Christian Date: Thu, 16 Nov 2023 07:12:27 -0800 Subject: [PATCH] updated utils for bedrock.meta streaming --- litellm/utils.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/litellm/utils.py b/litellm/utils.py index 1475dcb586..445da0db55 100644 --- a/litellm/utils.py +++ b/litellm/utils.py @@ -4443,6 +4443,9 @@ class CustomStreamWrapper: is_finished = True finish_reason = stop_reason ######## bedrock.cohere mappings ############### + # meta mapping + elif "generation" in chunk_data: + text = chunk_data['generation'] # bedrock.meta # cohere mapping elif "text" in chunk_data: text = chunk_data["text"] # bedrock.cohere