bedrock test for inference fixes

This commit is contained in:
Dinesh Yeduguru 2024-11-07 15:24:45 -08:00
parent e0f227f23c
commit 98c09323a9
3 changed files with 4 additions and 10 deletions

View file

@ -84,7 +84,7 @@ class BedrockInferenceAdapter(ModelRegistryHelper, Inference):
contents = bedrock_message["content"]
tool_calls = []
text_content = []
text_content = ""
for content in contents:
if "toolUse" in content:
tool_use = content["toolUse"]
@ -98,7 +98,7 @@ class BedrockInferenceAdapter(ModelRegistryHelper, Inference):
)
)
elif "text" in content:
text_content.append(content["text"])
text_content += content["text"]
return CompletionMessage(
role=role,