Skip to content

Commit 2ac5ec4

Browse files
committed
fix: use 'or []' to guard against explicit content=None in V2 messages
1 parent 81f159b commit 2ac5ec4

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

src/cohere/oci_client.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -703,7 +703,7 @@ def transform_request_to_oci(
703703
transformed_content.append(item)
704704
oci_msg["content"] = transformed_content
705705
else:
706-
oci_msg["content"] = msg.get("content", [])
706+
oci_msg["content"] = msg.get("content") or []
707707

708708
if "tool_calls" in msg:
709709
oci_msg["toolCalls"] = msg["tool_calls"]

0 commit comments

Comments
 (0)