Skip to content

Commit

Permalink
[CLEANUP][Models]
Browse files Browse the repository at this point in the history
  • Loading branch information
Your Name committed Sep 17, 2024
1 parent 06488ef commit 46726f9
Show file tree
Hide file tree
Showing 17 changed files with 50 additions and 25 deletions.
6 changes: 4 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -131,7 +131,8 @@ import os

from swarms_memory import ChromaDB

from swarms import Agent, Anthropic
from swarms import Agent
from swarm_models import Anthropic
from swarms.prompts.finance_agent_sys_prompt import (
FINANCIAL_AGENT_SYS_PROMPT,
)
Expand Down Expand Up @@ -369,7 +370,8 @@ The following is an example of an agent that intakes a pydantic basemodel and ou

```python
from pydantic import BaseModel, Field
from swarms import Anthropic, Agent
from swarms import Agent
from swarm_models import Anthropic


# Initialize the schema for the person's information
Expand Down
3 changes: 2 additions & 1 deletion agent_with_rag.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,8 @@

from swarms_memory import ChromaDB

from swarms import Agent, Anthropic
from swarms import Agent
from swarm_models import Anthropic
from swarms.prompts.finance_agent_sys_prompt import (
FINANCIAL_AGENT_SYS_PROMPT,
)
Expand Down
9 changes: 6 additions & 3 deletions docs/swarms/memory/diy_memory.md
Original file line number Diff line number Diff line change
Expand Up @@ -455,7 +455,8 @@ Now, how do you integrate a vector datbase with an agent? This is how:
```python
from typing import List, Dict, Any
from swarms_memory import PineconeMemory
from swarms import Agent, Anthropic
from swarms import Agent
from swarm_models import Anthropic
from transformers import AutoTokenizer, AutoModel
import torch
import os
Expand Down Expand Up @@ -508,7 +509,8 @@ ChromaDB is a simple, high-performance vector store for use with embeddings. Her

```python
from swarms_memory import ChromaDB
from swarms import Agent, Anthropic
from swarms import Agent
from swarm_models import Anthropic
import os

# Initialize the ChromaDB client
Expand Down Expand Up @@ -540,7 +542,8 @@ Faiss is a library for efficient similarity search and clustering of dense vecto
```python
from typing import List, Dict, Any
from swarms_memory.faiss_wrapper import FAISSDB
from swarms import Agent, Anthropic
from swarms import Agent
from swarm_models import Anthropic
from transformers import AutoTokenizer, AutoModel
import torch
import os
Expand Down
3 changes: 2 additions & 1 deletion docs/swarms/structs/agent.md
Original file line number Diff line number Diff line change
Expand Up @@ -319,7 +319,8 @@ import os

from swarms_memory import ChromaDB

from swarms import Agent, Anthropic
from swarms import Agent
from swarm_models import Anthropic
from swarms.prompts.finance_agent_sys_prompt import (
FINANCIAL_AGENT_SYS_PROMPT,
)
Expand Down
6 changes: 4 additions & 2 deletions docs/swarms/structs/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -157,7 +157,8 @@ Implementation of Devin in less than 90 lines of code with several tools:
terminal, browser, and edit files.

```python
from swarms import Agent, Anthropic
from swarms import Agent
from swarm_models import Anthropic
import subprocess

# Model
Expand Down Expand Up @@ -263,7 +264,8 @@ The following is an example of an agent that intakes a pydantic basemodel and ou

```python
from pydantic import BaseModel, Field
from swarms import Anthropic, Agent
from swarms import Agent
from swarm_models import Anthropic


# Initialize the schema for the person's information
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,8 @@ import os

from swarms_memory import ChromaDB

from swarms import Agent, Anthropic
from swarms import Agent
from swarm_models import Anthropic
from swarms.prompts.finance_agent_sys_prompt import (
FINANCIAL_AGENT_SYS_PROMPT,
)
Expand Down
3 changes: 2 additions & 1 deletion examples/agents/tools/devin.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
from swarms import Agent, Anthropic, tool
from swarms import Agent
from swarm_models import Anthropic, tool
import subprocess

# Model
Expand Down
3 changes: 2 additions & 1 deletion examples/agents/tools/full_stack_agent.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
from swarms import Agent, Anthropic, tool
from swarms import Agent
from swarm_models import Anthropic, tool


# Tool
Expand Down
3 changes: 2 additions & 1 deletion examples/agents/tools/tool.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
from swarms import Agent, Anthropic, tool
from swarms import Agent
from swarm_models import Anthropic, tool

# Model
llm = Anthropic(
Expand Down
3 changes: 2 additions & 1 deletion examples/agents/use_cases/finance/first_agent_example.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
import os
from swarms import Agent, Anthropic
from swarms import Agent
from swarm_models import Anthropic
from swarms.prompts.finance_agent_sys_prompt import (
FINANCIAL_AGENT_SYS_PROMPT,
)
Expand Down
12 changes: 8 additions & 4 deletions examples/collabs/swarms_example.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -201,7 +201,8 @@
"metadata": {},
"outputs": [],
"source": [
"from swarms import Agent, Anthropic\n",
"from swarms import Agent
from swarm_models import Anthropic\n",
"\n",
"\n",
"## Initialize the workflow\n",
Expand Down Expand Up @@ -240,7 +241,8 @@
"metadata": {},
"outputs": [],
"source": [
"from swarms import Agent, Anthropic, tool\n",
"from swarms import Agent
from swarm_models import Anthropic, tool\n",
"import subprocess\n",
"\n",
"# Model\n",
Expand Down Expand Up @@ -361,7 +363,8 @@
"outputs": [],
"source": [
"from pydantic import BaseModel, Field\n",
"from swarms import Anthropic, Agent\n",
"from swarms import Agent
from swarm_models import Anthropic\n",
"\n",
"\n",
"# Initialize the schema for the person's information\n",
Expand Down Expand Up @@ -1388,7 +1391,8 @@
"metadata": {},
"outputs": [],
"source": [
"from swarms import Agent, Anthropic, AgentRearrange \n",
"from swarms import Agent
from swarm_models import Anthropic, AgentRearrange \n",
"\n",
"## Initialize the workflow\n",
"agent = Agent(\n",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -505,7 +505,8 @@
}
],
"source": [
"from swarms import Agent, Anthropic\n",
"from swarms import Agent
from swarm_models import Anthropic\n",
"import subprocess\n",
"\n",
"# Model\n",
Expand Down
3 changes: 2 additions & 1 deletion examples/demos/fintech/main.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
from swarms import Agent, Anthropic, AgentRearrange
from swarms import Agent
from swarm_models import Anthropic, AgentRearrange

# Define the agents with specific tasks for financial activities
agent_risk_analysis = Agent(
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
import os

from swarms import Agent, Anthropic, MultiAgentCollaboration
from swarms import Agent
from swarm_models import Anthropic, MultiAgentCollaboration
from swarms.prompts.finance_agent_sys_prompt import (
FINANCIAL_AGENT_SYS_PROMPT,
)
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
from swarms import Agent, Anthropic
from swarms import Agent
from swarm_models import Anthropic
from swarms.structs.round_robin import RoundRobinSwarm

# Initialize the director agent
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
from swarms import Agent, Anthropic
from swarms import Agent
from swarm_models import Anthropic
from swarms.structs.society_of_agents import SocietyOfAgents

# Initialize the director agent
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -131,7 +131,8 @@ import os

from swarms_memory import ChromaDB

from swarms import Agent, Anthropic
from swarms import Agent
from swarm_models import Anthropic
from swarms.prompts.finance_agent_sys_prompt import (
FINANCIAL_AGENT_SYS_PROMPT,
)
Expand Down Expand Up @@ -369,7 +370,8 @@ The following is an example of an agent that intakes a pydantic basemodel and ou

```python
from pydantic import BaseModel, Field
from swarms import Anthropic, Agent
from swarms import Agent
from swarm_models import Anthropic


# Initialize the schema for the person's information
Expand Down

0 comments on commit 46726f9

Please sign in to comment.