Files
crewAI/tests/test_multimodal_validation.py
Devin AI b7e4d074a5 Fix lint issues and update agent.execute_task for recursion depth
- Remove unused imports and variables in test files
- Replace bare except with specific exception in structured_output_converter.py
- Fix None comparison in llm_test.py
- Update agent.execute_task to accept recursion_depth parameter

Resolves all remaining lint issues for A2A protocol implementation.

Co-Authored-By: Joe Moura <joao@crewai.com>
2025-05-25 04:20:26 +00:00

43 lines
1.4 KiB
Python

import os
import pytest
@pytest.mark.skip(reason="Only run manually with valid API keys")
def test_multimodal_agent_with_image_url():
"""
Test that a multimodal agent can process images without validation errors.
This test reproduces the scenario from issue #2475.
"""
OPENAI_API_KEY = os.getenv("OPENAI_API_KEY")
if not OPENAI_API_KEY:
pytest.skip("OPENAI_API_KEY environment variable not set")
# model="openai/gpt-4o", # model with vision capabilities
# api_key=OPENAI_API_KEY,
# temperature=0.7
# )
# role="Visual Quality Inspector",
# goal="Perform detailed quality analysis of product images",
# backstory="Senior quality control expert with expertise in visual inspection",
# llm=llm,
# verbose=True,
# allow_delegation=False,
# multimodal=True
# )
# description="""
# Analyze the product image at https://www.us.maguireshoes.com/collections/spring-25/products/lucena-black-boot with focus on:
# 1. Quality of materials
# 2. Manufacturing defects
# 3. Compliance with standards
# Provide a detailed report highlighting any issues found.
# """,
# expected_output="A detailed report highlighting any issues found",
# agent=None # Would reference the agent if test was active
# )
# This test is skipped, so we don't need to create or run a Crew