diff --git a/litellm/tests/test_completion.py b/litellm/tests/test_completion.py index beef7407c5..306f0b2f6e 100644 --- a/litellm/tests/test_completion.py +++ b/litellm/tests/test_completion.py @@ -139,7 +139,7 @@ def test_completion_gpt4_vision(): pass except Exception as e: pytest.fail(f"Error occurred: {e}") -# test_completion_gpt4_vision() +test_completion_gpt4_vision() def test_completion_perplexity_api(): try: diff --git a/litellm/utils.py b/litellm/utils.py index 0268bf99a6..ac8c9d8d29 100644 --- a/litellm/utils.py +++ b/litellm/utils.py @@ -1154,7 +1154,7 @@ def client(original_function): elif kwargs.get("messages", None): messages = kwargs["messages"] ### PRE-CALL RULES ### - rules_obj.pre_call_rules(input="".join(m["content"] for m in messages), model=model) + rules_obj.pre_call_rules(input="".join(m["content"] for m in messages if isinstance(m["content"], str)), model=model) elif call_type == CallTypes.embedding.value: messages = args[1] if len(args) > 1 else kwargs["input"] stream = True if "stream" in kwargs and kwargs["stream"] == True else False