mirror of
https://github.com/BerriAI/litellm.git
synced 2025-04-27 11:43:54 +00:00
fix(bedrock.py): fix conditional
This commit is contained in:
parent
b83c1bf09e
commit
ee5bedf541
1 changed files with 4 additions and 3 deletions
|
@ -954,13 +954,14 @@ def completion(
|
|||
if (
|
||||
len(outputText) > 0
|
||||
and hasattr(model_response.choices[0], "message")
|
||||
and model_response.choices[0].message.tool_calls is None
|
||||
and getattr(model_response.choices[0].message, "tool_calls", None)
|
||||
is None
|
||||
):
|
||||
model_response["choices"][0]["message"]["content"] = outputText
|
||||
elif (
|
||||
hasattr(model_response.choices[0], "message")
|
||||
and hasattr(model_response.choices[0].message, "tool_calls")
|
||||
and model_response.choices[0].message.tool_calls is not None
|
||||
and getattr(model_response.choices[0].message, "tool_calls", None)
|
||||
is not None
|
||||
):
|
||||
pass
|
||||
else:
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue