crewAIInc / crewAI-examples

2.6k stars 965 forks source link

game-builder-crew Task expected_output error #116

Closed kaurov closed 2 days ago

kaurov commented 3 months ago

1) how to fix the following error message?

/crewAI-examples/game-builder-crew$ python main.py

Traceback (most recent call last):
  File "/crewAI-examples/game-builder-crew/main.py", line 22, in <module>
    code_game = tasks.code_task(senior_engineer_agent, game)
  File "/crewAI-examples/game-builder-crew/tasks.py", line 6, in code_task
    return Task(description=dedent(f"""You will create a game using python, these are the instructions:
  File "/home/username/.local/lib/python3.10/site-packages/crewai/task.py", line 76, in __init__
    super().__init__(**config, **data)
  File "/home/username/.local/lib/python3.10/site-packages/pydantic/main.py", line 171, in __init__
    self.__pydantic_validator__.validate_python(data, self_instance=self)
pydantic_core._pydantic_core.ValidationError: 1 validation error for Task
expected_output
  Field required [type=missing, input_value={'description': "You will...o
produce perfect code)}, input_type=dict]
    For further information visit https://errors.pydantic.dev/2.6/v/missing

2) https://github.com/joaomdmoura/crewAI-examples/tree/main/game-builder-crew/README.md please replace 'landing page' by 'game'

daffainfo commented 3 months ago

@kaurov add expected_output attribute when creating a task, for example:

Task(
        description="Example",
        agent=general_agent,
        expected_output="Example"
)
dashan996 commented 3 months ago

Anyone can help? Why if set "allow_delegation=True", chief agent always stop due to reach limitation? But false is ok . I use llama3. Thanks a lot!

github-actions[bot] commented 1 week ago

This issue is stale because it has been open for 30 days with no activity. Remove stale label or comment or this will be closed in 5 days.

github-actions[bot] commented 2 days ago

This issue was closed because it has been stale for 5 days with no activity.