feat: set basic structure deploy commands

This commit is contained in:
Eduardo Chiarotti
2024-08-19 17:22:05 -03:00
parent ddda8f6bda
commit ff5c55fd54
3 changed files with 76 additions and 0 deletions

View File

@@ -7,12 +7,15 @@ from crewai.memory.storage.kickoff_task_outputs_storage import (
KickoffTaskOutputsSQLiteStorage,
)
from .deploy.main import DeployCommand
from .evaluate_crew import evaluate_crew
from .replay_from_task import replay_task_command
from .reset_memories_command import reset_memories_command
from .run_crew import run_crew
from .train_crew import train_crew
deploy_cmd = DeployCommand("myCrew_test")
@click.group()
def crewai():
@@ -172,5 +175,54 @@ def run():
run_crew()
# Deploy command group
@crewai.group()
def deploy():
"""Deploy the Crew CLI group."""
pass
@deploy.command(name="up")
def deploy_up():
"""Deploy the crew."""
deploy_cmd.deploy()
@deploy.command(name="create")
def deploy_create():
"""Create a deployment."""
deploy_cmd.create_crew()
@deploy.command(name="list")
def deploy_list():
"""List all deployments."""
deploy_cmd.list_crews()
@deploy.command(name="status")
def deply_status():
"""Get the status of a deployment."""
deploy_cmd.get_crew_status()
@deploy.command(name="logs")
def deploy_logs():
"""Get the logs of a deployment."""
deploy_cmd.get_crew_logs()
@deploy.command(name="remove")
def deploy_remove():
"""Remove a deployment."""
deploy_cmd.remove_crew()
@deploy.command(name="signup")
def signup():
"""Sign up for a deployment."""
deploy_cmd.signup()
if __name__ == "__main__":
crewai()

View File

View File

@@ -0,0 +1,24 @@
class DeployCommand:
def __init__(self, project_name):
self.project_name = project_name
def deploy(self):
print("Deploying the crew...")
def create_crew(self):
print("Creating deployment...")
def list_crews(self):
print("Listing all deployments...")
def get_crew_status(self):
print("Getting deployment status...")
def get_crew_logs(self):
print("Getting deployment logs...")
def remove_crew(self):
print("Removing deployment...")
def signup(self):
print("Signing up for deployment...")