From 36279fba6abc1efb911fa425eef430d4474a13b6 Mon Sep 17 00:00:00 2001 From: evelynmitchell Date: Mon, 25 Nov 2024 15:47:16 -0700 Subject: [PATCH 1/6] remove 3.9 from python packaging action --- .github/workflows/python-package.yml | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/.github/workflows/python-package.yml b/.github/workflows/python-package.yml index 6e563af2..c0ad132e 100644 --- a/.github/workflows/python-package.yml +++ b/.github/workflows/python-package.yml @@ -1,6 +1,8 @@ # This workflow will install Python dependencies, run tests and lint with a variety of Python versions # For more information see: https://docs.github.com/en/actions/automating-builds-and-tests/building-and-testing-python +# [ ] TODO [pep 458](https://blog.pypi.org/posts/2024-11-14-pypi-now-supports-digital-attestations/) + name: Python package on: @@ -16,7 +18,7 @@ jobs: strategy: fail-fast: false matrix: - python-version: ["3.9", "3.10", "3.11", "3.12"] + python-version: ["3.10", "3.11", "3.12"] steps: - uses: actions/checkout@v4 From 2e16d86465cd4923ccff00d3e9563030049749d9 Mon Sep 17 00:00:00 2001 From: Your Name Date: Wed, 27 Nov 2024 10:46:34 -0800 Subject: [PATCH 2/6] [CLEANUP] --- .gitignore | 3 ++- docs/swarms/install/install.md | 2 +- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/.gitignore b/.gitignore index 89b0cdc7..9f6e25b6 100644 --- a/.gitignore +++ b/.gitignore @@ -8,7 +8,8 @@ audio/ video/ artifacts_three dataframe/ - +.ruff_cache +.pytest_cache static/generated runs Financial-Analysis-Agent_state.json diff --git a/docs/swarms/install/install.md b/docs/swarms/install/install.md index f69a09bd..9d52d84e 100644 --- a/docs/swarms/install/install.md +++ b/docs/swarms/install/install.md @@ -127,7 +127,7 @@ Before you begin, ensure you have the following installed: poetry install --extras "desktop" ``` -=== "Using Docker" +=== "Using Docker COMING SOON [DOES NOT WORK YET]" Docker is an excellent option for creating isolated and reproducible environments, suitable for both development and production. From 96ffec472d42e8143676ea6f746dae10cc98fd81 Mon Sep 17 00:00:00 2001 From: Your Name Date: Wed, 27 Nov 2024 10:37:02 -0800 Subject: [PATCH 3/6] [DOCS] --- docs/assets/css/extra.css | 107 ++++++++++++++++++++++++++++++++++---- docs/mkdocs.yml | 2 + 2 files changed, 99 insertions(+), 10 deletions(-) diff --git a/docs/assets/css/extra.css b/docs/assets/css/extra.css index b639e2f7..713feb4f 100644 --- a/docs/assets/css/extra.css +++ b/docs/assets/css/extra.css @@ -1,18 +1,105 @@ +/* Root variables for primary colors */ +:root { + --md-primary-bg-color: #0d0d0d; /* Black background */ + --md-secondary-bg-color: #1a1a1a; /* Slightly lighter black */ + --md-accent-color: #FF073A; /* Neon red */ + --md-accent-color--hover: #FF2050; /* Bright neon red for hover */ + --md-text-color: #ffffff; /* White text */ + --md-code-bg-color: #121212; /* Darker background for code blocks */ + --md-code-border-color: #FF073A; /* Neon red border for code blocks */ + --md-link-color: var(--md-accent-color); +} -/* Further customization as needed */ +/* Apply background and text colors globally */ +body { + background-color: var(--md-primary-bg-color); + color: var(--md-text-color); +} +/* Headings with neon glow */ +h1, h2, h3, h4, h5, h6 { + color: var(--md-accent-color); + text-shadow: 0 0 5px var(--md-accent-color), 0 0 10px var(--md-accent-color); +} +/* Links with hover effects */ +a { + color: var(--md-link-color); + text-decoration: none; +} +a:hover { + color: var(--md-accent-color--hover); + text-shadow: 0 0 5px var(--md-accent-color--hover), 0 0 10px var(--md-accent-color--hover); +} + +/* Sidebar styling */ +.md-sidebar { + background-color: var(--md-secondary-bg-color); + border-right: 2px solid var(--md-accent-color); +} + +/* Navigation links in sidebar */ +.md-sidebar .md-nav__link { + color: var(--md-text-color); +} +.md-sidebar .md-nav__link:hover, +.md-sidebar .md-nav__link--active { + color: var(--md-accent-color); + background-color: var(--md-primary-bg-color); +} + +/* Code blocks with neon red accents */ +.md-typeset code { + background-color: var(--md-code-bg-color); + color: var(--md-text-color); + border: 1px solid var(--md-code-border-color); + border-radius: 4px; + padding: 2px 4px; + font-family: 'Fira Code', monospace; + text-shadow: 0 0 3px var(--md-code-border-color); +} + +/* Tables */ .md-typeset__table { - min-width: 100%; + min-width: 100%; + border-collapse: collapse; + background-color: var(--md-secondary-bg-color); + color: var(--md-text-color); +} +.md-typeset__table th, .md-typeset__table td { + border: 1px solid var(--md-accent-color); + padding: 8px; +} + +/* Buttons */ +button { + background-color: var(--md-accent-color); + color: var(--md-text-color); + border: none; + border-radius: 4px; + padding: 10px 15px; + cursor: pointer; + text-shadow: 0 0 5px var(--md-accent-color); +} +button:hover { + background-color: var(--md-accent-color--hover); } -.md-typeset table:not([class]) { - display: table; +/* Additional styling for search bar */ +.md-search__form { + background-color: var(--md-secondary-bg-color); + border: 1px solid var(--md-accent-color); +} +.md-search__input { + background-color: var(--md-primary-bg-color); + color: var(--md-text-color); } -/* -:root { - --md-primary-fg-color: #EE0F0F; - --md-primary-fg-color--light: #ECB7B7; - --md-primary-fg-color--dark: #90030C; - } */ \ No newline at end of file +/* Further customization */ +footer { + background-color: var(--md-secondary-bg-color); + color: var(--md-text-color); + text-align: center; + padding: 10px; + border-top: 2px solid var(--md-accent-color); +} diff --git a/docs/mkdocs.yml b/docs/mkdocs.yml index 23958829..e11ff4bd 100644 --- a/docs/mkdocs.yml +++ b/docs/mkdocs.yml @@ -63,12 +63,14 @@ theme: palette: - scheme: default primary: black + accent: red toggle: icon: material/brightness-7 name: Switch to dark mode # Palette toggle for dark mode - scheme: slate primary: black + accent: red toggle: icon: material/brightness-4 name: Switch to light mode From 0a51709dbe7352e05f5b169128ebe87384e910d6 Mon Sep 17 00:00:00 2001 From: Your Name Date: Wed, 27 Nov 2024 10:52:53 -0800 Subject: [PATCH 4/6] [DOCS] --- auto_swarm_builder.py | 2 -- docs/mkdocs.yml | 3 ++- 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/auto_swarm_builder.py b/auto_swarm_builder.py index 8d981dda..93e542fd 100644 --- a/auto_swarm_builder.py +++ b/auto_swarm_builder.py @@ -1,5 +1,3 @@ -from loguru import logger - import os from typing import List diff --git a/docs/mkdocs.yml b/docs/mkdocs.yml index e11ff4bd..9e5fc4ab 100644 --- a/docs/mkdocs.yml +++ b/docs/mkdocs.yml @@ -69,7 +69,7 @@ theme: name: Switch to dark mode # Palette toggle for dark mode - scheme: slate - primary: black + primary: white accent: red toggle: icon: material/brightness-4 @@ -82,6 +82,7 @@ theme: - navigation.expand - navigation.top - announce.dismiss + # Extensions markdown_extensions: - abbr From ff51b620a939e10b1f2adde611d1ecead5657f72 Mon Sep 17 00:00:00 2001 From: Occupying-Mars Date: Tue, 3 Dec 2024 11:24:18 +0530 Subject: [PATCH 5/6] bug fix --- swarms/structs/agent.py | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/swarms/structs/agent.py b/swarms/structs/agent.py index 48c4ff63..c9160b1b 100644 --- a/swarms/structs/agent.py +++ b/swarms/structs/agent.py @@ -1621,11 +1621,16 @@ class Agent: files = os.listdir(self.docs_folder) # Extract the text from the files + # Process each file and combine their contents + all_text = "" for file in files: - text = data_to_text(file) + file_path = os.path.join(self.docs_folder, file) + text = data_to_text(file_path) + all_text += f"\nContent from {file}:\n{text}\n" + # Add the combined content to memory return self.short_memory.add( - role=self.user_name, content=text + role=self.user_name, content=all_text ) except Exception as error: logger.error( From 6eac1e7ed715069741e1488f3a8ee6ae7f45cc79 Mon Sep 17 00:00:00 2001 From: Occupying-Mars Date: Tue, 3 Dec 2024 11:40:12 +0530 Subject: [PATCH 6/6] readme fix --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index dee89a6b..0180866c 100644 --- a/README.md +++ b/README.md @@ -462,7 +462,7 @@ from pydantic import BaseModel, Field from transformers import AutoModelForCausalLM, AutoTokenizer from swarms import ToolAgent -from swarms.utils.json_utils import base_model_to_json +from swarms.tools.json_utils import base_model_to_json # Load the pre-trained model and tokenizer model = AutoModelForCausalLM.from_pretrained(