From df222331f7a86e67b2e8dc0ccbef42e28ad2c67b Mon Sep 17 00:00:00 2001 From: Kye Gomez Date: Mon, 20 May 2024 20:49:12 -0400 Subject: [PATCH] [CLEANUP][requirements.txt] --- docs/requirements.txt | 0 playground/demos/agent_in_5/youtube_demo_agent.py | 1 + playground/swarms/hierarchical_swarm.py | 1 + requirements.txt | 0 swarms/models/base_embedding_model.py | 3 +-- swarms/structs/company.py | 1 + tests/models/test_hf.py | 6 ------ 7 files changed, 4 insertions(+), 8 deletions(-) create mode 100644 docs/requirements.txt create mode 100644 requirements.txt diff --git a/docs/requirements.txt b/docs/requirements.txt new file mode 100644 index 00000000..e69de29b diff --git a/playground/demos/agent_in_5/youtube_demo_agent.py b/playground/demos/agent_in_5/youtube_demo_agent.py index 242dce40..bd2faf58 100644 --- a/playground/demos/agent_in_5/youtube_demo_agent.py +++ b/playground/demos/agent_in_5/youtube_demo_agent.py @@ -4,6 +4,7 @@ Building an Autonomous Agent in 5 minutes with: - Tools: Search, Browser, ETC - Long Term Mmeory: ChromaDB, Weaviate, Pinecone, ETC """ + from swarms import Agent, OpenAIChat, tool from playground.demos.agent_in_5.chroma_db import ChromaDB diff --git a/playground/swarms/hierarchical_swarm.py b/playground/swarms/hierarchical_swarm.py index 58397e04..582f2f01 100644 --- a/playground/swarms/hierarchical_swarm.py +++ b/playground/swarms/hierarchical_swarm.py @@ -2,6 +2,7 @@ Boss selects what agent to use B -> W1, W2, W3 """ + from typing import List, Optional from pydantic import BaseModel, Field from swarms.tools.json_utils import str_to_json diff --git a/requirements.txt b/requirements.txt new file mode 100644 index 00000000..e69de29b diff --git a/swarms/models/base_embedding_model.py b/swarms/models/base_embedding_model.py index cb5e4d28..528a0c35 100644 --- a/swarms/models/base_embedding_model.py +++ b/swarms/models/base_embedding_model.py @@ -44,8 +44,7 @@ class BaseEmbeddingModel( raise RuntimeError("Failed to embed string.") @abstractmethod - def try_embed_chunk(self, chunk: str) -> list[float]: - ... + def try_embed_chunk(self, chunk: str) -> list[float]: ... def _embed_long_string(self, string: str) -> list[float]: """Embeds a string that is too long to embed in one go.""" diff --git a/swarms/structs/company.py b/swarms/structs/company.py index db18b857..7e59f866 100644 --- a/swarms/structs/company.py +++ b/swarms/structs/company.py @@ -6,6 +6,7 @@ from swarms.structs.conversation import Conversation from swarms.utils.logger import logger from swarms.structs.base_swarm import BaseSwarm + @dataclass class Company(BaseSwarm): """ diff --git a/tests/models/test_hf.py b/tests/models/test_hf.py index 8c7df81b..804cd780 100644 --- a/tests/models/test_hf.py +++ b/tests/models/test_hf.py @@ -5,14 +5,8 @@ import pytest import torch from swarms.models.huggingface import HuggingfaceLLM -from unittest.mock import patch -import pytest -import torch -from swarms.models.huggingface import ( - HuggingfaceLLM, # Replace with the actual import path -) # Fixture for the class instance