Skip to content

Commit

Permalink
[CLEANUP]
Browse files Browse the repository at this point in the history
  • Loading branch information
Kye committed Apr 28, 2024
1 parent 842068c commit 53fc90d
Show file tree
Hide file tree
Showing 15 changed files with 20 additions and 384 deletions.
1 change: 1 addition & 0 deletions hiearchical_swarm.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@
from swarms.models.base_llm import BaseLLM
from swarms.memory.base_vectordb import BaseVectorDatabase


boss_sys_prompt = (
"You're the Swarm Orchestrator, like a project manager of a"
" bustling hive. When a task arises, you tap into your network of"
Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
2 changes: 1 addition & 1 deletion playground/structs/kyle_hackathon.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

from swarms import Agent, OpenAIChat
from swarms.agents.multion_agent import MultiOnAgent
from swarms.memory.chroma_db import ChromaDB
from playground.memory.chroma_db import ChromaDB
from swarms.tools.tool import tool
from swarms.tools.code_interpreter import SubprocessCodeInterpreter

Expand Down
2 changes: 1 addition & 1 deletion playground/structs/multi_modal_rag_agent.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
from dotenv import load_dotenv

from swarms import Agent, OpenAIChat
from swarms.memory.chroma_db import ChromaDB
from playground.memory.chroma_db import ChromaDB
from swarms.prompts.visual_cot import VISUAL_CHAIN_OF_THOUGHT
from swarms.tools.tool import tool

Expand Down
161 changes: 0 additions & 161 deletions swarms/memory/qdrant.py

This file was deleted.

1 change: 0 additions & 1 deletion swarms/structs/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,6 @@
from swarms.structs.multi_threaded_workflow import (
MultiThreadedWorkflow,
)
from swarms.structs.nonlinear_workflow import NonlinearWorkflow
from swarms.structs.plan import Plan
from swarms.structs.recursive_workflow import RecursiveWorkflow
from swarms.structs.schemas import (
Expand Down
22 changes: 10 additions & 12 deletions swarms/structs/agent.py
Original file line number Diff line number Diff line change
@@ -1,40 +1,38 @@
import asyncio
import json
import logging
from typing import Union
import os
import random
import sys
import time
import uuid
from typing import Any, Callable, Dict, List, Optional, Tuple
from typing import Any, Callable, Dict, List, Optional, Tuple, Union

import yaml
from loguru import logger
from pydantic import BaseModel
from termcolor import colored

from swarms.memory.base_vectordb import BaseVectorDatabase
from swarms.prompts.agent_system_prompts import AGENT_SYSTEM_PROMPT_3
from swarms.prompts.multi_modal_autonomous_instruction_prompt import (
MULTI_MODAL_AUTO_AGENT_SYSTEM_PROMPT_1,
)
from swarms.prompts.worker_prompt import tool_usage_worker_prompt
from swarms.structs.conversation import Conversation
from swarms.tools.tool import BaseTool
from swarms.structs.schemas import ManySteps, Step
from swarms.structs.yaml_model import YamlModel
from swarms.telemetry.user_utils import get_user_device_data
from swarms.tools.code_interpreter import SubprocessCodeInterpreter
from swarms.utils.data_to_text import data_to_text
from swarms.utils.parse_code import extract_code_from_markdown
from swarms.utils.pdf_to_text import pdf_to_text
from swarms.tools.exec_tool import execute_tool_by_name
from swarms.prompts.worker_prompt import tool_usage_worker_prompt
from pydantic import BaseModel
from swarms.tools.pydantic_to_json import (
base_model_to_openai_function,
multi_base_model_to_openai_function,
)
from swarms.structs.schemas import Step, ManySteps
from swarms.telemetry.user_utils import get_user_device_data
from swarms.structs.yaml_model import YamlModel
from swarms.tools.code_interpreter import SubprocessCodeInterpreter
from swarms.tools.tool import BaseTool
from swarms.utils.data_to_text import data_to_text
from swarms.utils.parse_code import extract_code_from_markdown
from swarms.utils.pdf_to_text import pdf_to_text


# Utils
Expand Down
90 changes: 0 additions & 90 deletions swarms/structs/nonlinear_workflow.py

This file was deleted.

32 changes: 5 additions & 27 deletions swarms/structs/plan.py
Original file line number Diff line number Diff line change
@@ -1,32 +1,10 @@
from typing import List

from pydantic import BaseModel
from swarms.structs.step import Step


class Plan:
def __init__(self, steps: List[Step]):
"""
Initializes a Plan object.
Args:
steps (List[Step]): A list of Step objects representing the steps in the plan.
"""
self.steps = steps

def __str__(self) -> str:
"""
Returns a string representation of the Plan object.
Returns:
str: A string representation of the Plan object.
"""
return str([str(step) for step in self.steps])

def __repr(self) -> str:
"""
Returns a string representation of the Plan object.
class Plan(BaseModel):
steps: List[Step]

Returns:
str: A string representation of the Plan object.
"""
return str(self)
class Config:
orm_mode = True
Loading

0 comments on commit 53fc90d

Please sign in to comment.