Git Product home page Git Product logo

Comments (2)

shaihi avatar shaihi commented on June 30, 2024

Same error when running starter_template:
Traceback (most recent call last):
File ".../starter_template/main.py", line 68, in
result = custom_crew.run()
^^^^^^^^^^^^^^^^^
File ".../starter_template/main.py", line 39, in run
custom_task_1 = tasks.task_1_name(
^^^^^^^^^^^^^^^^^^
File ".../starter_template/tasks.py", line 13, in task_1_name
return Task(
^^^^^
File ".../crewAIenv/lib/python3.12/site-packages/crewai/task.py", line 102, in init
super().init(**config, **data)
File ".../crewAIenv/lib/python3.12/site-packages/pydantic/main.py", line 176, 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': "\nDo som...agent 1 backstory here)}, input_type=dict]
For further information visit https://errors.pydantic.dev/2.7/v/missing

from crewai-examples.

kaibrach avatar kaibrach commented on June 30, 2024

You have to specify the expected_output for the task.
The expected_output field is mandatory for the task. See the description of the Task class and the mandatory Field:

class Task(BaseModel):
    """ Class that represents a task to be executed.
   Each task must have a description, an expected output and an agent responsible for execution.
...

"""

For example:

task = Task(
    description='Edit the blog post draft, improving its clarity, coherence, and engagement.', 
    agent=content_editor,
    expected_output='A refined finalized version of the blog post in markdown format'
)

from crewai-examples.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.