This repository includes standard components within the Swarmauri framework.
Project description
Swarmauri Standard
The Swarmauri SDK offers a comprehensive suite of tools designed for building distributed, extensible systems using the Swarmauri framework.
Standard
- Concrete Classes: Ready-to-use, pre-implemented classes that fulfill standard system needs while adhering to Swarmauri principles. These classes are the first in line for ongoing support and maintenance, ensuring they remain stable, performant, and up to date with future SDK developments.
AI Kit
The AI Kit provides a collection of tools and components for building intelligent systems with the Swarmauri SDK. Below is an overview of the directories and their contents:
Agents
- QAAgent.py: Implements a question-answering agent.
- RagAgent.py: Implements a retrieval-augmented generation agent.
- SimpleConversationAgent.py: Implements a basic conversational agent.
- ToolAgent.py: Implements an agent that uses various tools.
Chains
- CallableChain.py: Defines a chain of callable steps.
- ChainStep.py: Represents a single step in a chain.
- ContextChain.py: Manages context within a chain.
- PromptContextChain.py: Handles prompt-based context in a chain.
Chunkers
- DelimiterBasedChunker.py: Splits text based on delimiters.
- FixedLengthChunker.py: Splits text into fixed-length chunks.
- MdSnippetChunker.py: Splits markdown text into snippets.
- SentenceChunker.py: Splits text into sentences.
- SlidingWindowChunker.py: Splits text using a sliding window approach.
Conversations
- Conversation.py: Manages conversation state and flow.
- MaxSizeConversation.py: Implements a conversation with a maximum size limit.
- MaxSystemContextConversation.py: Manages conversation with system context constraints.
- SessionCacheConversation.py: Implements a session-cached conversation.
Data Connectors
- GoogleDriveDataConnector.py: Connects to Google Drive for data access.
Decorators
- deprecate.py: Marks functions as deprecated.
- maybe_async.py: Allows functions to be optionally asynchronous.
- retry_on_status_codes.py: Retries functions based on status codes.
- tool_decorator.py: Decorates tool functions.
Distances
- CanberraDistance.py: Calculates Canberra distance.
- ChebyshevDistance.py: Calculates Chebyshev distance.
- ChiSquaredDistance.py: Calculates Chi-squared distance.
- CosineDistance.py: Calculates Cosine distance.
- EuclideanDistance.py: Calculates Euclidean distance.
- HaversineDistance.py: Calculates Haversine distance.
- JaccardIndexDistance.py: Calculates Jaccard index distance.
- LevenshteinDistance.py: Calculates Levenshtein distance.
- ManhattanDistance.py: Calculates Manhattan distance.
- SorensenDiceDistance.py: Calculates Sørensen-Dice distance.
- SquaredEuclideanDistance.py: Calculates squared Euclidean distance.
Documents
- Document.py: Manages document data and operations.
Embeddings
- CohereEmbedding.py: Generates embeddings using Cohere.
- GeminiEmbedding.py: Generates embeddings using Gemini.
- MistralEmbedding.py: Generates embeddings using Mistral.
- OpenAIEmbedding.py: Generates embeddings using OpenAI.
- TfidfEmbedding.py: Generates TF-IDF embeddings.
- VoyageEmbedding.py: Generates embeddings using Voyage.
Exceptions
- IndexErrorWithContext.py: Custom index error with context.
Factories
- AgentFactory.py: Creates agents using predefined configurations.
Image Generators
- BlackForestImgGenModel.py: Generates images using the Black Forest model.
- DeepInfraImgGenModel.py: Generates images using the Deep Infra model.
- FalAIImgGenModel.py: Generates images using the Fal AI model.
- HyperbolicImgGenModel.py: Generates images using the Hyperbolic model.
- OpenAIImgGenModel.py: Generates images using the OpenAI model.
LLMs
- AI21StudioModel.py: Implements the AI21 Studio model.
- AnthropicModel.py: Implements the Anthropic model.
- AnthropicToolModel.py: Implements the Anthropic tool model.
- CohereModel.py: Implements the Cohere model.
- CohereToolModel.py: Implements the Cohere tool model.
- DeepInfraModel.py: Implements the Deep Infra model.
- DeepSeekModel.py: Implements the Deep Seek model.
- FalAIVisionModel.py: Implements the Fal AI Vision model.
- GeminiProModel.py: Implements the Gemini Pro model.
- GeminiToolModel.py: Implements the Gemini tool model.
- GroqAIAudio.py: Implements the Groq AI audio model.
- GroqModel.py: Implements the Groq model.
- GroqToolModel.py: Implements the Groq tool model.
- GroqVisionModel.py: Implements the Groq vision model.
- HyperbolicAudioTTS.py: Implements the Hyperbolic audio TTS model.
- HyperbolicModel.py: Implements the Hyperbolic model.
- HyperbolicVisionModel.py: Implements the Hyperbolic vision model.
- LlamaCppModel.py: Implements the Llama Cpp model.
- MistralModel.py: Implements the Mistral model.
- MistralToolModel.py: Implements the Mistral tool model.
- OpenAIAudio.py: Implements the OpenAI audio model.
- OpenAIAudioTTS.py: Implements the OpenAI audio TTS model.
- OpenAIModel.py: Implements the OpenAI model.
- OpenAIReasonModel.py: Implements the OpenAI reason model.
- OpenAIToolModel.py: Implements the OpenAI tool model.
- PerplexityModel.py: Implements the Perplexity model.
- PlayHTModel.py: Implements the PlayHT model.
- WhisperLargeModel.py: Implements the Whisper Large model.
Measurements
- CompletenessMeasurement.py: Measures the completeness of data.
- DistinctivenessMeasurement.py: Measures the distinctiveness of data.
- FirstImpressionMeasurement.py: Measures the first impression of data.
- MeanMeasurement.py: Measures the mean of data.
- MiscMeasurement.py: Miscellaneous measurements.
- MissingnessMeasurement.py: Measures the missingness of data.
- PatternMatchingMeasurement.py: Measures pattern matching in data.
- RatioOfSumsMeasurement.py: Measures the ratio of sums in data.
- StaticMeasurement.py: Static measurements.
- UniquenessMeasurement.py: Measures the uniqueness of data.
- ZeroMeasurement.py: Measures zero values in data.
Messages
- AgentMessage.py: Defines messages sent by agents.
- FunctionMessage.py: Defines messages for functions.
- HumanMessage.py: Defines messages sent by humans.
- SystemMessage.py: Defines system messages.
Parsers
- CSVParser.py: Parses CSV files.
- HTMLTagStripParser.py: Strips HTML tags from text.
- Md2HtmlParser.py: Converts markdown to HTML.
- OpenAPISpecParser.py: Parses OpenAPI specifications.
- PhoneNumberExtractorParser.py: Extracts phone numbers from text.
- PythonParser.py: Parses Python code.
- RegExParser.py: Parses text using regular expressions.
- URLExtractorParser.py: Extracts URLs from text.
- XMLParser.py: Parses XML files.
Pipelines
- Pipeline.py: Defines data processing pipelines.
Prompts
- PromptGenerator.py: Generates prompts.
- PromptMatrix.py: Defines a matrix of prompts.
- Prompt.py: Defines a single prompt.
Prompt Templates
- PromptTemplate.py: Defines templates for generating prompts.
Schema Converters
- AnthropicSchemaConverter.py: Converts schemas for Anthropic models.
- CohereSchemaConverter.py: Converts schemas for Cohere models.
- GeminiSchemaConverter.py: Converts schemas for Gemini models.
- GroqSchemaConverter.py: Converts schemas for Groq models.
- MistralSchemaConverter.py: Converts schemas for Mistral models.
- OpenAISchemaConverter.py: Converts schemas for OpenAI models.
- ShuttleAISchemaConverter.py: Converts schemas for Shuttle AI models.
Service Registries
- ServiceRegistry.py: Manages service registrations.
State
- DictState.py: Manages state using dictionaries.
STT (Speech-to-Text)
- GroqSTT.py: Implements speech-to-text using Groq.
- OpenaiSTT.py: Implements speech-to-text using OpenAI.
- WhisperLargeSTT.py: Implements speech-to-text using Whisper Large.
Swarms
- Swarm.py: Manages swarm operations.
Task Management Strategies
- RoundRobinStrategy.py: Implements a round-robin task management strategy.
Toolkits
- AccessibilityToolkit.py: Provides tools for accessibility.
- Toolkit.py: Defines a general toolkit.
Tool LLMs
- AnthropicToolModel.py: Implements the Anthropic tool model.
- CohereToolModel.py: Implements the Cohere tool model.
- GeminiToolModel.py: Implements the Gemini tool model.
- GroqToolModel.py: Implements the Groq tool model.
- MistralToolModel.py: Implements the Mistral tool model.
- OpenAIToolModel.py: Implements the OpenAI tool model.
Tools
- AdditionTool.py: Implements a tool for performing addition operations.
- AutomatedReadabilityIndexTool.py: Calculates the Automated Readability Index.
- CalculatorTool.py: Provides basic calculator functionalities.
- CodeExtractorTool.py: Extracts code snippets from text.
- CodeInterpreterTool.py: Interprets and executes code snippets.
- ColemanLiauIndexTool.py: Calculates the Coleman-Liau Index.
- FleschKincaidTool.py: Calculates the Flesch-Kincaid Grade Level.
- FleschReadingEaseTool.py: Calculates the Flesch Reading Ease score.
- GunningFogTool.py: Calculates the Gunning Fog Index.
- ImportMemoryModuleTool.py: Imports memory modules.
- JSONRequestsTool.py: Handles JSON-based HTTP requests.
- Parameter.py: Manages tool parameters.
- RequestsTool.py: Handles HTTP requests.
- TemperatureConverterTool.py: Converts temperatures between different units.
- TestTool.py: Implements a test tool.
- WeatherTool.py: Provides weather-related functionalities.
Tracing
- CallableTracer.py: Traces callable objects.
- ChainTracer.py: Traces chains of operations.
- SimpleTraceContext.py: Provides a simple trace context.
- SimpleTracer.py: Implements a simple tracer.
- TracedVariable.py: Manages traced variables.
- VariableTracer.py: Traces variable changes.
Transports
- PubSubTransport.py: Implements a publish-subscribe transport mechanism.
TTS (Text-to-Speech)
- HyperbolicTTS.py: Implements text-to-speech using Hyperbolic.
- OpenaiTTS.py: Implements text-to-speech using OpenAI.
- PlayhtTTS.py: Implements text-to-speech using PlayHT.
Vectors
- Vector.py: Defines vector operations and manipulations.
Vector Stores
- TfidfVectorStore.py: Implements a vector store using TF-IDF.
VLMs (Vision-Language Models)
- FalVLM.py: Implements the Fal Vision-Language Model.
- GroqVLM.py: Implements the Groq Vision-Language Model.
- HyperbolicVLM.py: Implements the Hyperbolic Vision-Language Model.
Features
- Polymorphism: Allows for dynamic behavior switching between components, enabling flexible, context-aware system behavior.
- Discriminated Unions: Provides a robust method for handling multiple possible object types in a type-safe manner.
- Serialization: Efficiently encode and decode data for transmission across different environments and system components, with support for both standard and custom serialization formats.
- Intensional and Extensional Programming: Leverages both rule-based (intensional) and set-based (extensional) approaches to building and manipulating complex data structures, offering developers a wide range of tools for system design.
Use Cases
- Modular Systems: Develop scalable, pluggable systems that can evolve over time by adding or modifying components without disrupting the entire ecosystem.
- Distributed Architectures: Build systems with distributed nodes that seamlessly communicate using the SDK’s standardized interfaces.
- Third-Party Integrations: Extend the system's capabilities by easily incorporating third-party tools, libraries, and services.
- Prototype and Experimentation: Test cutting-edge ideas using the experimental components in the SDK, while retaining the reliability of core and standard features for production systems.
Future Development
The Swarmauri SDK is an evolving platform, and the community is encouraged to contribute to its growth. Upcoming releases will focus on enhancing the framework's modularity, providing more advanced serialization methods, and expanding the community-driven component library.
Contributing
Contributions are welcome! If you'd like to add a new feature, fix a bug, or improve documentation, kindly go through the contributions guidelines first.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file swarmauri_standard-0.9.2.tar.gz.
File metadata
- Download URL: swarmauri_standard-0.9.2.tar.gz
- Upload date:
- Size: 251.0 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: uv/0.10.3 {"installer":{"name":"uv","version":"0.10.3","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
0c78eca04f92fb578146ac9c1769d721fe6914ddb9d0efbaa39212d831b7c2af
|
|
| MD5 |
183ec09cec07f71555725ee6206a9b2f
|
|
| BLAKE2b-256 |
191fda6903df781a971d6122293130eecfb9385a78d8dc7e567583cd6c916577
|
File details
Details for the file swarmauri_standard-0.9.2-py3-none-any.whl.
File metadata
- Download URL: swarmauri_standard-0.9.2-py3-none-any.whl
- Upload date:
- Size: 476.6 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: uv/0.10.3 {"installer":{"name":"uv","version":"0.10.3","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
55e223fab48a1a18b07f7a32c891c5da8f51a40d1a14f9444b6abdf49cb25f8f
|
|
| MD5 |
5ec06d63d032cef978cc4a49a4de2a18
|
|
| BLAKE2b-256 |
6e8ccbeb5588500afc51e08fbc5c1876928ebed37b1f21c180710b2d8cbd20da
|