mirror of
https://github.com/crewAIInc/crewAI.git
synced 2026-01-10 00:28:31 +00:00
feat: Add crew train cli (#624)
* fix: fix crewai-tools cli command * feat: add crewai train CLI command * feat: add the tests * fix: fix typing hinting issue on code * fix: test.yml * fix: fix test * fix: removed fix since it didnt changed the test
This commit is contained in:
committed by
GitHub
parent
a336381849
commit
24ed8a2549
@@ -1,4 +1,5 @@
|
||||
#!/usr/bin/env python
|
||||
import sys
|
||||
from {{folder_name}}.crew import {{crew_name}}Crew
|
||||
|
||||
|
||||
@@ -7,4 +8,15 @@ def run():
|
||||
inputs = {
|
||||
'topic': 'AI LLMs'
|
||||
}
|
||||
{{crew_name}}Crew().crew().kickoff(inputs=inputs)
|
||||
{{crew_name}}Crew().crew().kickoff(inputs=inputs)
|
||||
|
||||
|
||||
def train():
|
||||
"""
|
||||
Train the crew for a given number of iterations.
|
||||
"""
|
||||
try:
|
||||
{{crew_name}}Crew().crew().train(n_iterations=int(sys.argv[1]))
|
||||
|
||||
except Exception as e:
|
||||
raise Exception(f"An error occurred while training the crew: {e}")
|
||||
|
||||
Reference in New Issue
Block a user