# Swarms Models
[![Join our Discord](https://img.shields.io/badge/Discord-Join%20our%20server-5865F2?style=for-the-badge&logo=discord&logoColor=white)](https://discord.gg/agora-999382051935506503) [![Subscribe on YouTube](https://img.shields.io/badge/YouTube-Subscribe-red?style=for-the-badge&logo=youtube&logoColor=white)](https://www.youtube.com/@kyegomez3242) [![Connect on LinkedIn](https://img.shields.io/badge/LinkedIn-Connect-blue?style=for-the-badge&logo=linkedin&logoColor=white)](https://www.linkedin.com/in/kye-g-38759a207/) [![Follow on X.com](https://img.shields.io/badge/X.com-Follow-1DA1F2?style=for-the-badge&logo=x&logoColor=white)](https://x.com/kyegomezb)
**Leverage LLM APIs with Unparalleled Speed, Security, and Reliability**
## **Why Swarm Models?**
- **Multi-Provider Support**: Effortlessly integrate APIs from various providers into your projects.
- **Bleeding-Edge Speed**: Experience lightning-fast performance optimized for efficiency.
- **Robust Security**: Built with top-notch security protocols to protect your data and API keys.
- **Ease of Use**: Simple initialization and execution with intuitive `.run(task)` and `__call__` methods.
- **Scalability**: Designed to handle everything from small scripts to large-scale applications.
---
## **Code Example**
```python
from swarm_models import OpenAIChat
import os
# Get the OpenAI API key from the environment variable
api_key = os.getenv("OPENAI_API_KEY")
# Create an instance of the OpenAIChat class
model = OpenAIChat(openai_api_key=api_key, model_name="gpt-4o-mini")
# Query the model with a question
out = model(
"What is the best state to register a business in the US for the least amount of taxes?"
)
# Print the model's response
print(out)
```
## **How It Works**
Swarm Models simplifies the way you interact with different APIs by providing a unified interface for all models.
### **1. Install Swarm Models**
```bash
$ pip3 install swarm-models
```
### **2. Set Your Keys**
```bash
OPENAI_API_KEY="your_openai_api_key"
GROQ_API_KEY="your_groq_api_key"
ANTHROPIC_API_KEY="your_anthropic_api_key"
AZURE_OPENAI_API_KEY="your_azure_openai_api_key"
```
### **3. Initialize a Model**
Import the desired model from the package and initialize it with your API key or necessary configuration.
```python
from swarm_models import YourDesiredModel
model = YourDesiredModel(api_key='your_api_key', *args, **kwargs)
```
### **4. Run Your Task**
Use the `.run(task)` method or simply call the model like `model(task)` with your task.
```python
task = "Define your task here"
result = model.run(task)
# Or equivalently
#result = model(task)
```
### **5. Enjoy the Results**
```python
print(result)
```
---
---
## **Get Started Now**
Ready to streamline your API integrations and boost your application's performance?
1. **Install the Package**
```bash
$ pip install swarm-models
```
2. **Explore the Documentation**
Dive into our comprehensive [Documentation](https://docs.swarms.world) to learn more about the available models and features.
3. **Join the Community**
Connect with other developers on our [GitHub](https://github.com/swarm-models) and contribute to the project.
[Download Now](https://pypi.org/project/swarm-models/) | [Documentation](https://example.com/docs) | [GitHub](https://github.com/The-Swarm-Corporation/swarm-models)
---
## **Available Models**
| Model Name | Description |
|---------------------------|-------------------------------------------------------|
| `OpenAIChat` | Chat model for OpenAI's GPT-3 and GPT-4 APIs. |
| `Anthropic` | Model for interacting with Anthropic's APIs. |
| `AzureOpenAI` | Azure's implementation of OpenAI's models. |
| `Dalle3` | Model for generating images from text prompts. |
| `NvidiaLlama31B` | Llama model for causal language generation. |
| `Fuyu` | Multi-modal model for image and text processing. |
| `Gemini` | Multi-modal model for vision and language tasks. |
| `Vilt` | Vision-and-Language Transformer for question answering.|
| `TogetherLLM` | Model for collaborative language tasks. |
| `FireWorksAI` | Model for generating creative content. |
| `ReplicateChat` | Chat model for replicating conversations. |
| `HuggingfaceLLM` | Interface for Hugging Face models. |
| `CogVLMMultiModal` | Multi-modal model for vision and language tasks. |
| `LayoutLMDocumentQA` | Model for document question answering. |
| `GPT4VisionAPI` | Model for analyzing images with GPT-4 capabilities. |
| `LlamaForCausalLM` | Causal language model from the Llama family. |
| `GroundedSAMTwo` | Analyzes and track objects in images. GPU Only |
## **Frequently Asked Questions**
**Q:** *Which providers are supported?*
**A:** Swarm Models supports a wide range of API providers. Check out the [documentation](https://docs.swarms.world) for a full list.
**Q:** *How do I secure my API keys?*
**A:** We recommend using environment variables or a secure key management system. Swarm Models ensures your keys are handled securely within the package.
---
## **Contact Us**
Join our [Discord](https://discord.gg/agora-999382051935506503) to stay updated and get support.
Raw data
{
"_id": null,
"home_page": "https://github.com/The-Swarm-Corporation/swarm-models",
"name": "swarm-models",
"maintainer": null,
"docs_url": null,
"requires_python": "<4.0,>=3.10",
"maintainer_email": null,
"keywords": "artificial intelligence, deep learning, optimizers, Prompt Engineering",
"author": "Kye Gomez",
"author_email": "kye@apac.ai",
"download_url": "https://files.pythonhosted.org/packages/8b/b6/61fdb943fcde9c402492eace4e92fa9a2e7e48aa266f27be34be4d0583d5/swarm_models-0.1.0.tar.gz",
"platform": null,
"description": "\n# Swarms Models\n\n[![Join our Discord](https://img.shields.io/badge/Discord-Join%20our%20server-5865F2?style=for-the-badge&logo=discord&logoColor=white)](https://discord.gg/agora-999382051935506503) [![Subscribe on YouTube](https://img.shields.io/badge/YouTube-Subscribe-red?style=for-the-badge&logo=youtube&logoColor=white)](https://www.youtube.com/@kyegomez3242) [![Connect on LinkedIn](https://img.shields.io/badge/LinkedIn-Connect-blue?style=for-the-badge&logo=linkedin&logoColor=white)](https://www.linkedin.com/in/kye-g-38759a207/) [![Follow on X.com](https://img.shields.io/badge/X.com-Follow-1DA1F2?style=for-the-badge&logo=x&logoColor=white)](https://x.com/kyegomezb)\n\n\n\n**Leverage LLM APIs with Unparalleled Speed, Security, and Reliability**\n\n\n## **Why Swarm Models?**\n\n- **Multi-Provider Support**: Effortlessly integrate APIs from various providers into your projects.\n\n- **Bleeding-Edge Speed**: Experience lightning-fast performance optimized for efficiency.\n\n- **Robust Security**: Built with top-notch security protocols to protect your data and API keys.\n\n- **Ease of Use**: Simple initialization and execution with intuitive `.run(task)` and `__call__` methods.\n- **Scalability**: Designed to handle everything from small scripts to large-scale applications.\n\n---\n\n## **Code Example**\n\n```python\nfrom swarm_models import OpenAIChat\nimport os\n\n# Get the OpenAI API key from the environment variable\napi_key = os.getenv(\"OPENAI_API_KEY\")\n\n# Create an instance of the OpenAIChat class\nmodel = OpenAIChat(openai_api_key=api_key, model_name=\"gpt-4o-mini\")\n\n# Query the model with a question\nout = model(\n \"What is the best state to register a business in the US for the least amount of taxes?\"\n)\n\n# Print the model's response\nprint(out)\n```\n\n\n\n## **How It Works**\n\nSwarm Models simplifies the way you interact with different APIs by providing a unified interface for all models.\n\n### **1. Install Swarm Models**\n\n```bash\n$ pip3 install swarm-models\n```\n\n### **2. Set Your Keys**\n\n```bash\nOPENAI_API_KEY=\"your_openai_api_key\"\nGROQ_API_KEY=\"your_groq_api_key\"\nANTHROPIC_API_KEY=\"your_anthropic_api_key\"\nAZURE_OPENAI_API_KEY=\"your_azure_openai_api_key\"\n```\n\n### **3. Initialize a Model**\n\nImport the desired model from the package and initialize it with your API key or necessary configuration.\n\n```python\nfrom swarm_models import YourDesiredModel\n\nmodel = YourDesiredModel(api_key='your_api_key', *args, **kwargs)\n```\n\n### **4. Run Your Task**\n\nUse the `.run(task)` method or simply call the model like `model(task)` with your task.\n\n```python\ntask = \"Define your task here\"\nresult = model.run(task)\n\n# Or equivalently\n#result = model(task)\n```\n\n### **5. Enjoy the Results**\n\n```python\nprint(result)\n```\n\n---\n\n\n---\n\n\n## **Get Started Now**\n\nReady to streamline your API integrations and boost your application's performance?\n\n1. **Install the Package**\n\n ```bash\n $ pip install swarm-models\n ```\n\n2. **Explore the Documentation**\n\n Dive into our comprehensive [Documentation](https://docs.swarms.world) to learn more about the available models and features.\n\n3. **Join the Community**\n\n Connect with other developers on our [GitHub](https://github.com/swarm-models) and contribute to the project.\n\n[Download Now](https://pypi.org/project/swarm-models/) | [Documentation](https://example.com/docs) | [GitHub](https://github.com/The-Swarm-Corporation/swarm-models)\n\n---\n\n## **Available Models**\n\n| Model Name | Description |\n|---------------------------|-------------------------------------------------------|\n| `OpenAIChat` | Chat model for OpenAI's GPT-3 and GPT-4 APIs. |\n| `Anthropic` | Model for interacting with Anthropic's APIs. |\n| `AzureOpenAI` | Azure's implementation of OpenAI's models. |\n| `Dalle3` | Model for generating images from text prompts. |\n| `NvidiaLlama31B` | Llama model for causal language generation. |\n| `Fuyu` | Multi-modal model for image and text processing. |\n| `Gemini` | Multi-modal model for vision and language tasks. |\n| `Vilt` | Vision-and-Language Transformer for question answering.|\n| `TogetherLLM` | Model for collaborative language tasks. |\n| `FireWorksAI` | Model for generating creative content. |\n| `ReplicateChat` | Chat model for replicating conversations. |\n| `HuggingfaceLLM` | Interface for Hugging Face models. |\n| `CogVLMMultiModal` | Multi-modal model for vision and language tasks. |\n| `LayoutLMDocumentQA` | Model for document question answering. |\n| `GPT4VisionAPI` | Model for analyzing images with GPT-4 capabilities. |\n| `LlamaForCausalLM` | Causal language model from the Llama family. |\n| `GroundedSAMTwo` | Analyzes and track objects in images. GPU Only |\n\n\n\n\n## **Frequently Asked Questions**\n\n**Q:** *Which providers are supported?*\n\n**A:** Swarm Models supports a wide range of API providers. Check out the [documentation](https://docs.swarms.world) for a full list.\n\n**Q:** *How do I secure my API keys?*\n\n**A:** We recommend using environment variables or a secure key management system. Swarm Models ensures your keys are handled securely within the package.\n\n---\n\n## **Contact Us**\n\nJoin our [Discord](https://discord.gg/agora-999382051935506503) to stay updated and get support.\n",
"bugtrack_url": null,
"license": "MIT",
"summary": "Swarm Models - Pytorch",
"version": "0.1.0",
"project_urls": {
"Documentation": "https://github.com/The-Swarm-Corporation/swarm-models",
"Homepage": "https://github.com/The-Swarm-Corporation/swarm-models",
"Repository": "https://github.com/The-Swarm-Corporation/swarm-models"
},
"split_keywords": [
"artificial intelligence",
" deep learning",
" optimizers",
" prompt engineering"
],
"urls": [
{
"comment_text": "",
"digests": {
"blake2b_256": "b4a39b0b22be9a16032b461ecfde246f9bd60c0ee4a8c4c04dddc5198f4249a6",
"md5": "c51320045f346b66aec797aee0eb9308",
"sha256": "2f28cd717793569e664f674605c3324cb056e0a8795526520494e6166e477f63"
},
"downloads": -1,
"filename": "swarm_models-0.1.0-py3-none-any.whl",
"has_sig": false,
"md5_digest": "c51320045f346b66aec797aee0eb9308",
"packagetype": "bdist_wheel",
"python_version": "py3",
"requires_python": "<4.0,>=3.10",
"size": 70347,
"upload_time": "2024-09-17T01:59:54",
"upload_time_iso_8601": "2024-09-17T01:59:54.207028Z",
"url": "https://files.pythonhosted.org/packages/b4/a3/9b0b22be9a16032b461ecfde246f9bd60c0ee4a8c4c04dddc5198f4249a6/swarm_models-0.1.0-py3-none-any.whl",
"yanked": false,
"yanked_reason": null
},
{
"comment_text": "",
"digests": {
"blake2b_256": "8bb661fdb943fcde9c402492eace4e92fa9a2e7e48aa266f27be34be4d0583d5",
"md5": "0fc0ade61dae1b83ce3d51abacb05df0",
"sha256": "8953095aa9b0a0bb93e39838235ab7ee4e3d984b607d32f2a1454ef402fc441b"
},
"downloads": -1,
"filename": "swarm_models-0.1.0.tar.gz",
"has_sig": false,
"md5_digest": "0fc0ade61dae1b83ce3d51abacb05df0",
"packagetype": "sdist",
"python_version": "source",
"requires_python": "<4.0,>=3.10",
"size": 54438,
"upload_time": "2024-09-17T01:59:55",
"upload_time_iso_8601": "2024-09-17T01:59:55.706071Z",
"url": "https://files.pythonhosted.org/packages/8b/b6/61fdb943fcde9c402492eace4e92fa9a2e7e48aa266f27be34be4d0583d5/swarm_models-0.1.0.tar.gz",
"yanked": false,
"yanked_reason": null
}
],
"upload_time": "2024-09-17 01:59:55",
"github": true,
"gitlab": false,
"bitbucket": false,
"codeberg": false,
"github_user": "The-Swarm-Corporation",
"github_project": "swarm-models",
"travis_ci": false,
"coveralls": false,
"github_actions": true,
"requirements": [],
"lcname": "swarm-models"
}