Skip to content

[BUG] multi modelΒ #2327

Open
Open
@imrankh46

Description

@imrankh46

Description

I am using the following code for multi model it's not working
https://docs.crewai.com/how-to/multimodal-agents

showing the following error

ValidationError: 2 validation errors for LLMCallStartedEvent
messages.str
  Input should be a valid string [type=string_type, input_value=[{'role': 'system', 'cont...t.PNG","action":null}'}], input_type=list]
    For further information visit https://errors.pydantic.dev/2.10/v/string_type
messages.list[dict[str,str]].3
  Input should be a valid dictionary [type=dict_type, input_value='{\'role\': \'user\', \'c...nal input question\n```', input_type=str]
    For further information visit https://errors.pydantic.dev/2.10/v/dict_type

also please add support for local image.

Steps to Reproduce

https://docs.crewai.com/how-to/multimodal-agents

Expected behavior

ValidationError: 2 validation errors for LLMCallStartedEvent
messages.str
  Input should be a valid string [type=string_type, input_value=[{'role': 'system', 'cont...t.PNG","action":null}'}], input_type=list]
    For further information visit https://errors.pydantic.dev/2.10/v/string_type
messages.list[dict[str,str]].3
  Input should be a valid dictionary [type=dict_type, input_value='{\'role\': \'user\', \'c...nal input question\n```', input_type=str]
    For further information visit https://errors.pydantic.dev/2.10/v/dict_type

Screenshots/Code snippets

from crewai import Agent, Task, Crew


# Create a multimodal agent
image_analyst = Agent(
    role="Product Analyst",
    goal="Analyze product images and provide detailed descriptions",
    backstory="Expert in visual product analysis with deep knowledge of design and features",
    multimodal=True,
   
)

# Create a task for image analysis
task = Task(
    description="Analyze the product image at url and provide a detailed description",
    expected_output="A detailed description of the product image",
    agent=image_analyst,
   
)

# Create and run the crew
crew = Crew(
    agents=[image_analyst],
    tasks=[task]
)

result = crew.kickoff()

Operating System

Ubuntu 20.04

Python Version

3.10

crewAI Version

latest

crewAI Tools Version

latest

Virtual Environment

Venv

Evidence

....

Possible Solution

....

Additional context

i don't know..

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions