diff --git a/spice/wrapped_clients.py b/spice/wrapped_clients.py index 01dbea7..b8e03fa 100644 --- a/spice/wrapped_clients.py +++ b/spice/wrapped_clients.py @@ -223,6 +223,7 @@ def _convert_messages( ) -> Tuple[str, List[MessageParam]]: # Anthropic handles both images and system messages different from OpenAI, only allows alternating user / assistant messages, # and doesn't support tools / function calling (still in beta, and doesn't support streaming) + messages = [m for m in messages if m.get("content", "").strip()] system = "" converted_messages: List[MessageParam] = []