prepping new version

This commit is contained in:
João Moura
2024-07-20 12:26:32 -04:00
parent f53a3a00e1
commit 349753a013
9 changed files with 676 additions and 374 deletions

View File

@@ -220,7 +220,7 @@ These methods provide flexibility in how you manage and execute tasks within you
### Replaying from specific task:
You can now replay from a specific task using our cli command replay.
The replay_from_tasks feature in CrewAI allows you to replay from a specific task using the command-line interface (CLI). By running the command `crewai replay -t <task_id>`, you can specify the `task_id` for the replay process.
The replay feature in CrewAI allows you to replay from a specific task using the command-line interface (CLI). By running the command `crewai replay -t <task_id>`, you can specify the `task_id` for the replay process.
Kickoffs will now save the latest kickoffs returned task outputs locally for you to be able to replay from.

View File

@@ -36,14 +36,14 @@ To replay from a task programmatically, use the following steps:
2. Execute the replay command within a try-except block to handle potential errors.
```python
def replay_from_task():
def replay():
"""
Replay the crew execution from a specific task.
"""
task_id = '<task_id>'
inputs = {"topic": "CrewAI Training"} # this is optional, you can pass in the inputs you want to replay otherwise uses the previous kickoffs inputs
try:
YourCrewName_Crew().crew().replay_from_task(task_id=task_id, inputs=inputs)
YourCrewName_Crew().crew().replay(task_id=task_id, inputs=inputs)
except Exception as e:
raise Exception(f"An error occurred while replaying the crew: {e}")