Fix issue #2724: Allow specifying trained data file for run command

Co-Authored-By: Joe Moura <joao@crewai.com>
This commit is contained in:
Devin AI
2025-04-29 21:20:58 +00:00
parent 25c8155609
commit 2f66aa0efc
6 changed files with 68 additions and 8 deletions

View File

@@ -201,9 +201,17 @@ def install(context):
@crewai.command()
def run():
@click.option(
"-f",
"--filename",
type=str,
default="trained_agents_data.pkl",
help="Path to a trained data file to use",
)
def run(filename: str):
"""Run the Crew."""
run_crew()
click.echo(f"Running the Crew with trained data from {filename}")
run_crew(trained_data_file=filename)
@crewai.command()