You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
25 lines
641 B
25 lines
641 B
from swarms import BaseSwarm, AutoSwarmRouter
|
|
|
|
|
|
class FinancialReportSummarization(BaseSwarm):
|
|
def __init__(self, name: str = None, *args, **kwargs):
|
|
super().__init__()
|
|
|
|
def run(self, task, *args, **kwargs):
|
|
return task
|
|
|
|
|
|
# Add swarm to router
|
|
router = AutoSwarmRouter(swarms=[FinancialReportSummarization])
|
|
|
|
# Create AutoSwarm Instance
|
|
autoswarm = AutoSwarmRouter(
|
|
name="kyegomez/FinancialReportSummarization",
|
|
description="A swarm for financial document summarizing and generation",
|
|
verbose=True,
|
|
router=router,
|
|
)
|
|
|
|
# Run the AutoSwarm
|
|
autoswarm.run("Analyze these documents and give me a summary:")
|