From 4f616feddd27008521c2254ef4cb7f83b204d2b0 Mon Sep 17 00:00:00 2001
From: evelynmitchell <evelynmitchell@users.noreply.github.com>
Date: Tue, 16 Jul 2024 16:23:25 -0600
Subject: [PATCH] fix sequential workflow example

add langchain-anthropic to reqs
redo indentation of example
---
 docs/swarms/structs/sequential_workflow.md | 64 +++++++++++-----------
 pyproject.toml                             |  1 +
 requirements.txt                           |  1 +
 3 files changed, 34 insertions(+), 32 deletions(-)

diff --git a/docs/swarms/structs/sequential_workflow.md b/docs/swarms/structs/sequential_workflow.md
index 05b047b6..f0038824 100644
--- a/docs/swarms/structs/sequential_workflow.md
+++ b/docs/swarms/structs/sequential_workflow.md
@@ -37,38 +37,38 @@ Runs the specified task through the agents in the dynamically constructed flow.
   from swarms import Agent, SequentialWorkflow, Anthropic
 
 
-    # Initialize the language model agent (e.g., GPT-3)
-    llm = Anthropic()
-
-    # Place your key in .env
-
-    # Initialize agents for individual tasks
-    agent1 = Agent(
-        agent_name="Blog generator",
-        system_prompt="Generate a blog post like stephen king",
-        llm=llm,
-        max_loops=1,
-        dashboard=False,
-        tools=[],
-    )
-    agent2 = Agent(
-        agent_name="summarizer",
-        system_prompt="Sumamrize the blog post",
-        llm=llm,
-        max_loops=1,
-        dashboard=False,
-        tools=[],
-    )
-
-    # Create the Sequential workflow
-    workflow = SequentialWorkflow(
-        agents=[agent1, agent2], max_loops=1, verbose=False
-    )
-
-    # Run the workflow
-    workflow.run(
-        "Generate a blog post on how swarms of agents can help businesses grow."
-    )
+  # Initialize the language model agent (e.g., GPT-3)
+  llm = Anthropic()
+
+  # Place your key in .env
+
+  # Initialize agents for individual tasks
+  agent1 = Agent(
+    agent_name="Blog generator",
+    system_prompt="Generate a blog post like stephen king",
+    llm=llm,
+    max_loops=1,
+    dashboard=False,
+    tools=[],
+  )
+  agent2 = Agent(
+    agent_name="summarizer",
+    system_prompt="Sumamrize the blog post",
+    llm=llm,
+    max_loops=1,
+    dashboard=False,
+    tools=[],
+  )
+
+  # Create the Sequential workflow
+  workflow = SequentialWorkflow(
+    agents=[agent1, agent2], max_loops=1, verbose=False
+  )
+
+  # Run the workflow
+  workflow.run(
+    "Generate a blog post on how swarms of agents can help businesses grow."
+  )
 
   ```
 
diff --git a/pyproject.toml b/pyproject.toml
index ae6c48be..84fa3cee 100644
--- a/pyproject.toml
+++ b/pyproject.toml
@@ -47,6 +47,7 @@ transformers = ">= 4.39.0, <5.0.0"
 asyncio = ">=3.4.3,<4.0"
 langchain-community = "0.0.29"
 langchain-experimental = "0.0.55"
+langchain-anthropic = "*"
 backoff = "2.2.1"
 toml = "*"
 pypdf = "4.3.0"
diff --git a/requirements.txt b/requirements.txt
index c153c5b0..e9fcb2ef 100644
--- a/requirements.txt
+++ b/requirements.txt
@@ -4,6 +4,7 @@ transformers>=4.39.0,<5.0.0
 asyncio>=3.4.3,<4.0
 langchain-community==0.0.29
 langchain-experimental==0.0.55
+langchain-anthropic
 backoff==2.2.1
 toml
 pypdf==4.1.0