diff --git a/README.md b/README.md index 1679b4713..71f76a11a 100644 --- a/README.md +++ b/README.md @@ -93,10 +93,11 @@ out = flow.run("Generate a 10,000 word blog on health and wellness.") - Integrate Flow's with various LLMs and Multi-Modality Models ```python -from swarms.models import OpenAIChat +from swarms.models import OpenAIChat, BioGPT, Anthropic from swarms.structs import Flow from swarms.structs.sequential_workflow import SequentialWorkflow + # Example usage api_key = ( "" # Your actual API key here @@ -109,13 +110,21 @@ llm = OpenAIChat( max_tokens=3000, ) -# Initialize the Flow with the language flow +biochat = BioGPT() + +# Use Anthropic +anthropic = Anthropic() + +# Initialize the agent with the language flow agent1 = Flow(llm=llm, max_loops=1, dashboard=False) -# Create another Flow for a different task +# Create another agent for a different task agent2 = Flow(llm=llm, max_loops=1, dashboard=False) -agent3 = Flow(llm=llm, max_loops=1, dashboard=False) +# Create another agent for a different task +agent3 = Flow(llm=biochat, max_loops=1, dashboard=False) + +# agent4 = Flow(llm=anthropic, max_loops="auto") # Create the workflow workflow = SequentialWorkflow(max_loops=1) diff --git a/docs/swarms/index.md b/docs/swarms/index.md index fc5c8e3e3..a20bc9f72 100644 --- a/docs/swarms/index.md +++ b/docs/swarms/index.md @@ -1,22 +1,7 @@ # Swarms -
- Swarms is a modular framework that enables reliable and useful multi-agent collaboration at scale to automate real-world tasks. - - - ## Vision At Swarms, we're transforming the landscape of AI from siloed AI agents to a unified 'swarm' of intelligence. Through relentless iteration and the power of collective insight from our 1500+ Agora researchers, we're developing a groundbreaking framework for AI collaboration. Our mission is to catalyze a paradigm shift, advancing Humanity with the power of unified autonomous AI agent swarms. diff --git a/sequential_workflow_example.py b/sequential_workflow_example.py index 9dc9c828e..9c17a0720 100644 --- a/sequential_workflow_example.py +++ b/sequential_workflow_example.py @@ -1,9 +1,12 @@ -from swarms.models import OpenAIChat +from swarms.models import OpenAIChat, BioGPT, Anthropic from swarms.structs import Flow from swarms.structs.sequential_workflow import SequentialWorkflow + # Example usage -api_key = "" +api_key = ( + "" # Your actual API key here +) # Initialize the language flow llm = OpenAIChat( @@ -12,24 +15,36 @@ max_tokens=3000, ) -# Initialize the Flow with the language flow -flow1 = Flow(llm=llm, max_loops=1, dashboard=False) +biochat = BioGPT() + +# Use Anthropic +anthropic = Anthropic() + +# Initialize the agent with the language flow +agent1 = Flow(llm=llm, max_loops=1, dashboard=False) -# Create another Flow for a different task -flow2 = Flow(llm=llm, max_loops=1, dashboard=False) +# Create another agent for a different task +agent2 = Flow(llm=llm, max_loops=1, dashboard=False) + +# Create another agent for a different task +agent3 = Flow(llm=biochat, max_loops=1, dashboard=False) + +# agent4 = Flow(llm=anthropic, max_loops="auto") # Create the workflow workflow = SequentialWorkflow(max_loops=1) # Add tasks to the workflow -workflow.add("Generate a 10,000 word blog on health and wellness.", flow1) +workflow.add("Generate a 10,000 word blog on health and wellness.", agent1) # Suppose the next task takes the output of the first task as input -workflow.add("Summarize the generated blog", flow2) +workflow.add("Summarize the generated blog", agent2) + +workflow.add("Create a references sheet of materials for the curriculm", agent3) # Run the workflow workflow.run() # Output the results for task in workflow.tasks: - print(f"Task: {task.description}, Result: {task.result}") + print(f"Task: {task.description}, Result: {task.result}") \ No newline at end of file