Skip to content

Commit 699c943

Browse files
author
Kye
committed
mistral caller, openai verison 2.8, llama function caller, tests for flow
1 parent 5f56023 commit 699c943

25 files changed

Lines changed: 1199 additions & 946 deletions

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,7 @@ stderr_log.txt
2424
__pycache__/
2525
*.py[cod]
2626
*$py.class
27+
.grit
2728
error.txt
2829

2930
# C extensions

README.md

Lines changed: 71 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -74,10 +74,7 @@ flow = Flow(
7474
# out = flow.load_state("flow_state.json")
7575
# temp = flow.dynamic_temperature()
7676
# filter = flow.add_response_filter("Trump")
77-
78-
# Run the flow
7977
out = flow.run("Generate a 10,000 word blog on health and wellness.")
80-
8178
# out = flow.validate_response(out)
8279
# out = flow.analyze_feedback(out)
8380
# out = flow.print_history_and_memory()
@@ -138,6 +135,77 @@ for task in workflow.tasks:
138135

139136
---
140137

138+
# Features 🤖
139+
The Swarms framework is designed with a strong emphasis on reliability, performance, and production-grade readiness.
140+
Below are the key features that make Swarms an ideal choice for enterprise-level AI deployments.
141+
142+
## 🚀 Production-Grade Readiness
143+
- **Scalable Architecture**: Built to scale effortlessly with your growing business needs.
144+
- **Enterprise-Level Security**: Incorporates top-notch security features to safeguard your data and operations.
145+
- **Containerization and Microservices**: Easily deployable in containerized environments, supporting microservices architecture.
146+
147+
## ⚙️ Reliability and Robustness
148+
- **Fault Tolerance**: Designed to handle failures gracefully, ensuring uninterrupted operations.
149+
- **Consistent Performance**: Maintains high performance even under heavy loads or complex computational demands.
150+
- **Automated Backup and Recovery**: Features automatic backup and recovery processes, reducing the risk of data loss.
151+
152+
## 💡 Advanced AI Capabilities
153+
154+
The Swarms framework is equipped with a suite of advanced AI capabilities designed to cater to a wide range of applications and scenarios, ensuring versatility and cutting-edge performance.
155+
156+
### Multi-Modal Autonomous Agents
157+
- **Versatile Model Support**: Seamlessly works with various AI models, including NLP, computer vision, and more, for comprehensive multi-modal capabilities.
158+
- **Context-Aware Processing**: Employs context-aware processing techniques to ensure relevant and accurate responses from agents.
159+
160+
### Function Calling Models for API Execution
161+
- **Automated API Interactions**: Function calling models that can autonomously execute API calls, enabling seamless integration with external services and data sources.
162+
- **Dynamic Response Handling**: Capable of processing and adapting to responses from APIs for real-time decision making.
163+
164+
### Varied Architectures of Swarms
165+
- **Flexible Configuration**: Supports multiple swarm architectures, from centralized to decentralized, for diverse application needs.
166+
- **Customizable Agent Roles**: Allows customization of agent roles and behaviors within the swarm to optimize performance and efficiency.
167+
168+
### Generative Models
169+
- **Advanced Generative Capabilities**: Incorporates state-of-the-art generative models to create content, simulate scenarios, or predict outcomes.
170+
- **Creative Problem Solving**: Utilizes generative AI for innovative problem-solving approaches and idea generation.
171+
172+
### Enhanced Decision-Making
173+
- **AI-Powered Decision Algorithms**: Employs advanced algorithms for swift and effective decision-making in complex scenarios.
174+
- **Risk Assessment and Management**: Capable of assessing risks and managing uncertain situations with AI-driven insights.
175+
176+
### Real-Time Adaptation and Learning
177+
- **Continuous Learning**: Agents can continuously learn and adapt from new data, improving their performance and accuracy over time.
178+
- **Environment Adaptability**: Designed to adapt to different operational environments, enhancing robustness and reliability.
179+
180+
181+
## 🔄 Efficient Workflow Automation
182+
- **Streamlined Task Management**: Simplifies complex tasks with automated workflows, reducing manual intervention.
183+
- **Customizable Workflows**: Offers customizable workflow options to fit specific business needs and requirements.
184+
- **Real-Time Analytics and Reporting**: Provides real-time insights into agent performance and system health.
185+
186+
## 🌐 Wide-Ranging Integration
187+
- **API-First Design**: Easily integrates with existing systems and third-party applications via robust APIs.
188+
- **Cloud Compatibility**: Fully compatible with major cloud platforms for flexible deployment options.
189+
- **Continuous Integration/Continuous Deployment (CI/CD)**: Supports CI/CD practices for seamless updates and deployment.
190+
191+
## 📊 Performance Optimization
192+
- **Resource Management**: Efficiently manages computational resources for optimal performance.
193+
- **Load Balancing**: Automatically balances workloads to maintain system stability and responsiveness.
194+
- **Performance Monitoring Tools**: Includes comprehensive monitoring tools for tracking and optimizing performance.
195+
196+
## 🛡️ Security and Compliance
197+
- **Data Encryption**: Implements end-to-end encryption for data at rest and in transit.
198+
- **Compliance Standards Adherence**: Adheres to major compliance standards ensuring legal and ethical usage.
199+
- **Regular Security Updates**: Regular updates to address emerging security threats and vulnerabilities.
200+
201+
## 💬 Community and Support
202+
- **Extensive Documentation**: Detailed documentation for easy implementation and troubleshooting.
203+
- **Active Developer Community**: A vibrant community for sharing ideas, solutions, and best practices.
204+
- **Professional Support**: Access to professional support for enterprise-level assistance and guidance.
205+
206+
Swarms framework is not just a tool but a robust, scalable, and secure partner in your AI journey, ready to tackle the challenges of modern AI applications in a business environment.
207+
208+
141209
## Documentation
142210
- For documentation, go here, [swarms.apac.ai](https://swarms.apac.ai)
143211

example.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
from swarms.models import OpenAIChat
22
from swarms.structs import Flow
33

4-
api_key = ""
4+
api_key = "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"
55

66
# Initialize the language model, this model can be swapped out with Anthropic, ETC, Huggingface Models like Mistral, ETC
77
llm = OpenAIChat(

playground/models/dall3.py

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,6 @@
11
from swarms.models import Dalle3
22

3-
dalle3 = Dalle3(
4-
openai_api_key=""
5-
)
3+
dalle3 = Dalle3(openai_api_key="")
64
task = "A painting of a dog"
75
image_url = dalle3(task)
8-
print(image_url)
6+
print(image_url)

pyproject.toml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -45,6 +45,7 @@ wget = "*"
4545
griptape = "*"
4646
httpx = "*"
4747
tiktoken = "*"
48+
safetensors = "*"
4849
attrs = "*"
4950
ggl = "*"
5051
ratelimit = "*"

requirements.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -48,6 +48,7 @@ opencv-python-headless
4848
imageio-ffmpeg
4949
invisible-watermark
5050
kornia
51+
safetensors
5152
numpy
5253
omegaconf
5354
open_clip_torch

swarms/artifacts/main.py

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,20 @@ class Artifact(BaseModel):
1010
"""
1111
1212
Artifact that has the task has been produced
13+
14+
Attributes:
15+
-----------
16+
17+
artifact_id: str
18+
ID of the artifact
19+
20+
file_name: str
21+
Filename of the artifact
22+
23+
relative_path: str
24+
Relative path of the artifact
25+
26+
1327
"""
1428

1529
artifact_id: StrictStr = Field(..., description="ID of the artifact")

swarms/memory/pg.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
from typing import Optional
33
from attr import define, field, Factory
44
from dataclasses import dataclass
5-
from swarms.memory.vector_stores.base import BaseVectorStore
5+
from swarms.memory.base import BaseVectorStore
66
from sqlalchemy.engine import Engine
77
from sqlalchemy import create_engine, Column, String, JSON
88
from sqlalchemy.ext.declarative import declarative_base

swarms/models/__init__.py

Lines changed: 13 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -6,20 +6,21 @@
66
# LLMs
77
from swarms.models.anthropic import Anthropic # noqa: E402
88
from swarms.models.petals import Petals # noqa: E402
9-
from swarms.models.mistral import Mistral # noqa: E402
10-
from swarms.models.openai_models import OpenAI, AzureOpenAI, OpenAIChat # noqa: E402
11-
from swarms.models.zephyr import Zephyr # noqa: E402
12-
from swarms.models.biogpt import BioGPT # noqa: E402
13-
from swarms.models.huggingface import HuggingfaceLLM # noqa: E402
14-
from swarms.models.wizard_storytelling import WizardLLMStoryTeller # noqa: E402
15-
from swarms.models.mpt import MPT7B # noqa: E402
9+
from swarms.models.mistral import Mistral # noqa: E402
10+
from swarms.models.openai_models import OpenAI, AzureOpenAI, OpenAIChat # noqa: E402
11+
from swarms.models.zephyr import Zephyr # noqa: E402
12+
from swarms.models.biogpt import BioGPT # noqa: E402
13+
from swarms.models.huggingface import HuggingfaceLLM # noqa: E402
14+
from swarms.models.wizard_storytelling import WizardLLMStoryTeller # noqa: E402
15+
from swarms.models.mpt import MPT7B # noqa: E402
1616

1717
# MultiModal Models
18-
from swarms.models.idefics import Idefics # noqa: E402
19-
from swarms.models.kosmos_two import Kosmos # noqa: E402
20-
from swarms.models.vilt import Vilt # noqa: E402
21-
from swarms.models.nougat import Nougat # noqa: E402
22-
from swarms.models.layoutlm_document_qa import LayoutLMDocumentQA # noqa: E402
18+
from swarms.models.idefics import Idefics # noqa: E402
19+
from swarms.models.kosmos_two import Kosmos # noqa: E402
20+
from swarms.models.vilt import Vilt # noqa: E402
21+
from swarms.models.nougat import Nougat # noqa: E402
22+
from swarms.models.layoutlm_document_qa import LayoutLMDocumentQA # noqa: E402
23+
2324
# from swarms.models.gpt4v import GPT4Vision
2425
# from swarms.models.dalle3 import Dalle3
2526
# from swarms.models.distilled_whisperx import DistilWhisperModel # noqa: E402

swarms/models/dalle3.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
1-
21
import concurrent.futures
32
import logging
43
import os
54
import uuid
65
from dataclasses import dataclass
76
from io import BytesIO
87
from typing import List
8+
99
import backoff
1010
import openai
1111
import requests

0 commit comments

Comments
 (0)