Swarms

Latest version: v5.1.7

Safety actively analyzes 638452 Python packages for vulnerabilities to keep your Python projects secure.

Scan your dependencies

Page 11 of 23

0.8.3

0.8.2

0.8.1

Bug Fixes
Issue: Lack of error handling and logging. Root Cause: The initial code did not have any error handling or logging mechanisms in place. This could lead to silent failures or uninformative error messages when something goes wrong. Resolution: Added extensive error handling and logging throughout the code. Each method now checks for required parameters and raises a ValueError with a descriptive message if a required parameter is missing. Additionally, try/except blocks have been added around the main logic of each method to catch any exceptions that might occur, log an error message, and re-raise the exception.

Issue: Lack of input validation. Root Cause: The initial code did not validate the inputs to the methods. This could lead to unexpected behavior or errors if invalid inputs are provided. Resolution: Added checks at the beginning of each method to validate the inputs. If an input is invalid (e.g., None when it should not be), an error message is logged and a ValueError or TypeError is raised.

Features Implemented
Feature: Modularization of parameters. Description: Made all meaningful parameters in the create_agent and create_worker_node methods optional with default values. This allows the user to customize the agent and worker node as needed without having to provide all parameters.

Feature: Documentation. Description: Added docstrings to each method to explain what they do. This will help users understand how to use the methods and what to expect from them.

Feature: Improved logging. Description: Configured the logging module to log messages with the timestamp, log level, and message. This will make the logs more informative and easier to read.

0.8.0

Changelog

- Created `LLM` class which serves as a wrapper for OpenAI's ChatGPT and Hugging Face's language models.

- Added optional parameters `openai_api_key`, `hf_repo_id`, `hf_api_token`, and `model_kwargs` to the `LLM` class.
- Introduced logic to switch between OpenAI's ChatGPT and Hugging Face's language models based on the provided optional parameters.


- Improved error handling in the `LLM` class. The class now raises a `ValueError` if neither `openai_api_key` nor `hf_repo_id` are provided. It also checks for the presence of `HUGGINGFACEHUB_API_TOKEN` in the environment variables.


- Improved modularity in the `LLM` class. Added the ability for the user to provide their own model parameters through the `model_kwargs` parameter.


- Updated `LLM` class to be shapeless, allowing users to provide their inputs in any shape they wish.
- Updated the error handling system to provide detailed error messages and log exceptions.


- Created a comprehensive suite of unit tests for the `LLM` class to ensure robustness and reliability of the code.
- Tests cover initializations, proper usage of underlying models, error handling for missing parameters, and environment variable checks.

Please note that this changelog reflects the changes made during our interactions and your instructions. The versioning is arbitrary and for the purpose of this demonstration only. In a real-world scenario, versioning would likely be more granular and follow semantic versioning principles.

0.7.9

0.7.8

Page 11 of 23

© 2024 Safety CLI Cybersecurity Inc. All Rights Reserved.