swarmauri-standard 0.6.0__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (238) hide show
  1. swarmauri_standard-0.6.0/LICENSE +201 -0
  2. swarmauri_standard-0.6.0/PKG-INFO +84 -0
  3. swarmauri_standard-0.6.0/README.md +50 -0
  4. swarmauri_standard-0.6.0/pyproject.toml +91 -0
  5. swarmauri_standard-0.6.0/swarmauri_standard/README.md +37 -0
  6. swarmauri_standard-0.6.0/swarmauri_standard/__init__.py +44 -0
  7. swarmauri_standard-0.6.0/swarmauri_standard/agents/QAAgent.py +37 -0
  8. swarmauri_standard-0.6.0/swarmauri_standard/agents/RagAgent.py +134 -0
  9. swarmauri_standard-0.6.0/swarmauri_standard/agents/SimpleConversationAgent.py +40 -0
  10. swarmauri_standard-0.6.0/swarmauri_standard/agents/ToolAgent.py +69 -0
  11. swarmauri_standard-0.6.0/swarmauri_standard/agents/__init__.py +16 -0
  12. swarmauri_standard-0.6.0/swarmauri_standard/chains/CallableChain.py +32 -0
  13. swarmauri_standard-0.6.0/swarmauri_standard/chains/ChainStep.py +12 -0
  14. swarmauri_standard-0.6.0/swarmauri_standard/chains/ContextChain.py +50 -0
  15. swarmauri_standard-0.6.0/swarmauri_standard/chains/PromptContextChain.py +8 -0
  16. swarmauri_standard-0.6.0/swarmauri_standard/chains/__init__.py +15 -0
  17. swarmauri_standard-0.6.0/swarmauri_standard/chunkers/DelimiterBasedChunker.py +43 -0
  18. swarmauri_standard-0.6.0/swarmauri_standard/chunkers/FixedLengthChunker.py +38 -0
  19. swarmauri_standard-0.6.0/swarmauri_standard/chunkers/MdSnippetChunker.py +58 -0
  20. swarmauri_standard-0.6.0/swarmauri_standard/chunkers/SentenceChunker.py +35 -0
  21. swarmauri_standard-0.6.0/swarmauri_standard/chunkers/SlidingWindowChunker.py +39 -0
  22. swarmauri_standard-0.6.0/swarmauri_standard/chunkers/__init__.py +18 -0
  23. swarmauri_standard-0.6.0/swarmauri_standard/control_panels/ControlPanel.py +12 -0
  24. swarmauri_standard-0.6.0/swarmauri_standard/control_panels/__init__.py +13 -0
  25. swarmauri_standard-0.6.0/swarmauri_standard/conversations/Conversation.py +12 -0
  26. swarmauri_standard-0.6.0/swarmauri_standard/conversations/MaxSizeConversation.py +27 -0
  27. swarmauri_standard-0.6.0/swarmauri_standard/conversations/MaxSystemContextConversation.py +99 -0
  28. swarmauri_standard-0.6.0/swarmauri_standard/conversations/SessionCacheConversation.py +93 -0
  29. swarmauri_standard-0.6.0/swarmauri_standard/conversations/__init__.py +22 -0
  30. swarmauri_standard-0.6.0/swarmauri_standard/dataconnectors/GoogleDriveDataConnector.py +341 -0
  31. swarmauri_standard-0.6.0/swarmauri_standard/dataconnectors/__init__.py +16 -0
  32. swarmauri_standard-0.6.0/swarmauri_standard/decorators/__init__.py +0 -0
  33. swarmauri_standard-0.6.0/swarmauri_standard/decorators/deprecate.py +134 -0
  34. swarmauri_standard-0.6.0/swarmauri_standard/decorators/maybe_async.py +20 -0
  35. swarmauri_standard-0.6.0/swarmauri_standard/decorators/retry_on_status_codes.py +94 -0
  36. swarmauri_standard-0.6.0/swarmauri_standard/decorators/tool_decorator.py +63 -0
  37. swarmauri_standard-0.6.0/swarmauri_standard/distances/CanberraDistance.py +71 -0
  38. swarmauri_standard-0.6.0/swarmauri_standard/distances/ChebyshevDistance.py +52 -0
  39. swarmauri_standard-0.6.0/swarmauri_standard/distances/ChiSquaredDistance.py +42 -0
  40. swarmauri_standard-0.6.0/swarmauri_standard/distances/CosineDistance.py +70 -0
  41. swarmauri_standard-0.6.0/swarmauri_standard/distances/EuclideanDistance.py +56 -0
  42. swarmauri_standard-0.6.0/swarmauri_standard/distances/HaversineDistance.py +54 -0
  43. swarmauri_standard-0.6.0/swarmauri_standard/distances/JaccardIndexDistance.py +76 -0
  44. swarmauri_standard-0.6.0/swarmauri_standard/distances/LevenshteinDistance.py +86 -0
  45. swarmauri_standard-0.6.0/swarmauri_standard/distances/ManhattanDistance.py +58 -0
  46. swarmauri_standard-0.6.0/swarmauri_standard/distances/MinkowskiDistance.py +68 -0
  47. swarmauri_standard-0.6.0/swarmauri_standard/distances/SorensenDiceDistance.py +58 -0
  48. swarmauri_standard-0.6.0/swarmauri_standard/distances/SquaredEuclideanDistance.py +56 -0
  49. swarmauri_standard-0.6.0/swarmauri_standard/distances/__init__.py +27 -0
  50. swarmauri_standard-0.6.0/swarmauri_standard/documents/Document.py +8 -0
  51. swarmauri_standard-0.6.0/swarmauri_standard/documents/__init__.py +11 -0
  52. swarmauri_standard-0.6.0/swarmauri_standard/embeddings/CohereEmbedding.py +199 -0
  53. swarmauri_standard-0.6.0/swarmauri_standard/embeddings/GeminiEmbedding.py +165 -0
  54. swarmauri_standard-0.6.0/swarmauri_standard/embeddings/MistralEmbedding.py +133 -0
  55. swarmauri_standard-0.6.0/swarmauri_standard/embeddings/NmfEmbedding.py +111 -0
  56. swarmauri_standard-0.6.0/swarmauri_standard/embeddings/OpenAIEmbedding.py +139 -0
  57. swarmauri_standard-0.6.0/swarmauri_standard/embeddings/TfidfEmbedding.py +55 -0
  58. swarmauri_standard-0.6.0/swarmauri_standard/embeddings/VoyageEmbedding.py +118 -0
  59. swarmauri_standard-0.6.0/swarmauri_standard/embeddings/__init__.py +19 -0
  60. swarmauri_standard-0.6.0/swarmauri_standard/exceptions/IndexErrorWithContext.py +26 -0
  61. swarmauri_standard-0.6.0/swarmauri_standard/exceptions/__init__.py +13 -0
  62. swarmauri_standard-0.6.0/swarmauri_standard/factories/AgentFactory.py +37 -0
  63. swarmauri_standard-0.6.0/swarmauri_standard/factories/Factory.py +44 -0
  64. swarmauri_standard-0.6.0/swarmauri_standard/factories/__init__.py +14 -0
  65. swarmauri_standard-0.6.0/swarmauri_standard/image_gens/BlackForestImgGenModel.py +277 -0
  66. swarmauri_standard-0.6.0/swarmauri_standard/image_gens/DeepInfraImgGenModel.py +211 -0
  67. swarmauri_standard-0.6.0/swarmauri_standard/image_gens/FalAIImgGenModel.py +340 -0
  68. swarmauri_standard-0.6.0/swarmauri_standard/image_gens/HyperbolicImgGenModel.py +226 -0
  69. swarmauri_standard-0.6.0/swarmauri_standard/image_gens/OpenAIImgGenModel.py +208 -0
  70. swarmauri_standard-0.6.0/swarmauri_standard/image_gens/__init__.py +17 -0
  71. swarmauri_standard-0.6.0/swarmauri_standard/llms/AI21StudioModel.py +419 -0
  72. swarmauri_standard-0.6.0/swarmauri_standard/llms/AnthropicModel.py +439 -0
  73. swarmauri_standard-0.6.0/swarmauri_standard/llms/AnthropicToolModel.py +470 -0
  74. swarmauri_standard-0.6.0/swarmauri_standard/llms/CohereModel.py +451 -0
  75. swarmauri_standard-0.6.0/swarmauri_standard/llms/CohereToolModel.py +629 -0
  76. swarmauri_standard-0.6.0/swarmauri_standard/llms/DeepInfraModel.py +377 -0
  77. swarmauri_standard-0.6.0/swarmauri_standard/llms/DeepSeekModel.py +377 -0
  78. swarmauri_standard-0.6.0/swarmauri_standard/llms/FalAIVisionModel.py +278 -0
  79. swarmauri_standard-0.6.0/swarmauri_standard/llms/GeminiProModel.py +483 -0
  80. swarmauri_standard-0.6.0/swarmauri_standard/llms/GeminiToolModel.py +613 -0
  81. swarmauri_standard-0.6.0/swarmauri_standard/llms/GroqAIAudio.py +231 -0
  82. swarmauri_standard-0.6.0/swarmauri_standard/llms/GroqModel.py +408 -0
  83. swarmauri_standard-0.6.0/swarmauri_standard/llms/GroqToolModel.py +492 -0
  84. swarmauri_standard-0.6.0/swarmauri_standard/llms/GroqVisionModel.py +410 -0
  85. swarmauri_standard-0.6.0/swarmauri_standard/llms/HyperbolicAudioTTS.py +159 -0
  86. swarmauri_standard-0.6.0/swarmauri_standard/llms/HyperbolicModel.py +440 -0
  87. swarmauri_standard-0.6.0/swarmauri_standard/llms/HyperbolicVisionModel.py +409 -0
  88. swarmauri_standard-0.6.0/swarmauri_standard/llms/LlamaCppModel.py +380 -0
  89. swarmauri_standard-0.6.0/swarmauri_standard/llms/MistralModel.py +444 -0
  90. swarmauri_standard-0.6.0/swarmauri_standard/llms/MistralToolModel.py +546 -0
  91. swarmauri_standard-0.6.0/swarmauri_standard/llms/OpenAIAudio.py +211 -0
  92. swarmauri_standard-0.6.0/swarmauri_standard/llms/OpenAIAudioTTS.py +250 -0
  93. swarmauri_standard-0.6.0/swarmauri_standard/llms/OpenAIModel.py +486 -0
  94. swarmauri_standard-0.6.0/swarmauri_standard/llms/OpenAIReasonModel.py +280 -0
  95. swarmauri_standard-0.6.0/swarmauri_standard/llms/OpenAIToolModel.py +468 -0
  96. swarmauri_standard-0.6.0/swarmauri_standard/llms/PerplexityModel.py +501 -0
  97. swarmauri_standard-0.6.0/swarmauri_standard/llms/PlayHTModel.py +384 -0
  98. swarmauri_standard-0.6.0/swarmauri_standard/llms/WhisperLargeModel.py +243 -0
  99. swarmauri_standard-0.6.0/swarmauri_standard/llms/__init__.py +81 -0
  100. swarmauri_standard-0.6.0/swarmauri_standard/measurements/CompletenessMeasurement.py +80 -0
  101. swarmauri_standard-0.6.0/swarmauri_standard/measurements/DistinctivenessMeasurement.py +99 -0
  102. swarmauri_standard-0.6.0/swarmauri_standard/measurements/FirstImpressionMeasurement.py +21 -0
  103. swarmauri_standard-0.6.0/swarmauri_standard/measurements/MeanMeasurement.py +52 -0
  104. swarmauri_standard-0.6.0/swarmauri_standard/measurements/MiscMeasurement.py +177 -0
  105. swarmauri_standard-0.6.0/swarmauri_standard/measurements/MissingnessMeasurement.py +121 -0
  106. swarmauri_standard-0.6.0/swarmauri_standard/measurements/PatternMatchingMeasurement.py +36 -0
  107. swarmauri_standard-0.6.0/swarmauri_standard/measurements/RatioOfSumsMeasurement.py +40 -0
  108. swarmauri_standard-0.6.0/swarmauri_standard/measurements/StaticMeasurement.py +21 -0
  109. swarmauri_standard-0.6.0/swarmauri_standard/measurements/UniquenessMeasurement.py +98 -0
  110. swarmauri_standard-0.6.0/swarmauri_standard/measurements/ZeroMeasurement.py +21 -0
  111. swarmauri_standard-0.6.0/swarmauri_standard/measurements/__init__.py +41 -0
  112. swarmauri_standard-0.6.0/swarmauri_standard/messages/AgentMessage.py +26 -0
  113. swarmauri_standard-0.6.0/swarmauri_standard/messages/FunctionMessage.py +16 -0
  114. swarmauri_standard-0.6.0/swarmauri_standard/messages/HumanMessage.py +41 -0
  115. swarmauri_standard-0.6.0/swarmauri_standard/messages/SystemMessage.py +11 -0
  116. swarmauri_standard-0.6.0/swarmauri_standard/messages/__init__.py +16 -0
  117. swarmauri_standard-0.6.0/swarmauri_standard/parsers/BeautifulSoupElementParser.py +47 -0
  118. swarmauri_standard-0.6.0/swarmauri_standard/parsers/CSVParser.py +50 -0
  119. swarmauri_standard-0.6.0/swarmauri_standard/parsers/HTMLTagStripParser.py +44 -0
  120. swarmauri_standard-0.6.0/swarmauri_standard/parsers/KeywordExtractorParser.py +55 -0
  121. swarmauri_standard-0.6.0/swarmauri_standard/parsers/Md2HtmlParser.py +40 -0
  122. swarmauri_standard-0.6.0/swarmauri_standard/parsers/OpenAPISpecParser.py +48 -0
  123. swarmauri_standard-0.6.0/swarmauri_standard/parsers/PhoneNumberExtractorParser.py +41 -0
  124. swarmauri_standard-0.6.0/swarmauri_standard/parsers/PythonParser.py +60 -0
  125. swarmauri_standard-0.6.0/swarmauri_standard/parsers/RegExParser.py +41 -0
  126. swarmauri_standard-0.6.0/swarmauri_standard/parsers/URLExtractorParser.py +45 -0
  127. swarmauri_standard-0.6.0/swarmauri_standard/parsers/XMLParser.py +49 -0
  128. swarmauri_standard-0.6.0/swarmauri_standard/parsers/__init__.py +29 -0
  129. swarmauri_standard-0.6.0/swarmauri_standard/pipelines/Pipeline.py +37 -0
  130. swarmauri_standard-0.6.0/swarmauri_standard/pipelines/__init__.py +13 -0
  131. swarmauri_standard-0.6.0/swarmauri_standard/prompt_templates/PromptTemplate.py +8 -0
  132. swarmauri_standard-0.6.0/swarmauri_standard/prompt_templates/__init__.py +0 -0
  133. swarmauri_standard-0.6.0/swarmauri_standard/prompts/Prompt.py +8 -0
  134. swarmauri_standard-0.6.0/swarmauri_standard/prompts/PromptGenerator.py +8 -0
  135. swarmauri_standard-0.6.0/swarmauri_standard/prompts/PromptMatrix.py +8 -0
  136. swarmauri_standard-0.6.0/swarmauri_standard/prompts/__init__.py +16 -0
  137. swarmauri_standard-0.6.0/swarmauri_standard/schema_converters/AnthropicSchemaConverter.py +32 -0
  138. swarmauri_standard-0.6.0/swarmauri_standard/schema_converters/CohereSchemaConverter.py +37 -0
  139. swarmauri_standard-0.6.0/swarmauri_standard/schema_converters/GeminiSchemaConverter.py +74 -0
  140. swarmauri_standard-0.6.0/swarmauri_standard/schema_converters/GroqSchemaConverter.py +40 -0
  141. swarmauri_standard-0.6.0/swarmauri_standard/schema_converters/MistralSchemaConverter.py +37 -0
  142. swarmauri_standard-0.6.0/swarmauri_standard/schema_converters/OpenAISchemaConverter.py +37 -0
  143. swarmauri_standard-0.6.0/swarmauri_standard/schema_converters/ShuttleAISchemaConverter.py +37 -0
  144. swarmauri_standard-0.6.0/swarmauri_standard/schema_converters/__init__.py +37 -0
  145. swarmauri_standard-0.6.0/swarmauri_standard/service_registries/ServiceRegistry.py +12 -0
  146. swarmauri_standard-0.6.0/swarmauri_standard/service_registries/__init__.py +16 -0
  147. swarmauri_standard-0.6.0/swarmauri_standard/state/DictState.py +52 -0
  148. swarmauri_standard-0.6.0/swarmauri_standard/state/__init__.py +13 -0
  149. swarmauri_standard-0.6.0/swarmauri_standard/stt/GroqSTT.py +233 -0
  150. swarmauri_standard-0.6.0/swarmauri_standard/stt/OpenaiSTT.py +224 -0
  151. swarmauri_standard-0.6.0/swarmauri_standard/stt/WhisperLargeSTT.py +251 -0
  152. swarmauri_standard-0.6.0/swarmauri_standard/stt/__init__.py +0 -0
  153. swarmauri_standard-0.6.0/swarmauri_standard/swarms/Swarm.py +38 -0
  154. swarmauri_standard-0.6.0/swarmauri_standard/swarms/__init__.py +13 -0
  155. swarmauri_standard-0.6.0/swarmauri_standard/task_mgmt_strategies/RoundRobinStrategy.py +85 -0
  156. swarmauri_standard-0.6.0/swarmauri_standard/task_mgmt_strategies/__init__.py +13 -0
  157. swarmauri_standard-0.6.0/swarmauri_standard/tool_llms/AnthropicToolModel.py +461 -0
  158. swarmauri_standard-0.6.0/swarmauri_standard/tool_llms/CohereToolModel.py +620 -0
  159. swarmauri_standard-0.6.0/swarmauri_standard/tool_llms/GeminiToolModel.py +602 -0
  160. swarmauri_standard-0.6.0/swarmauri_standard/tool_llms/GroqToolModel.py +483 -0
  161. swarmauri_standard-0.6.0/swarmauri_standard/tool_llms/MistralToolModel.py +537 -0
  162. swarmauri_standard-0.6.0/swarmauri_standard/tool_llms/OpenAIToolModel.py +459 -0
  163. swarmauri_standard-0.6.0/swarmauri_standard/tool_llms/__init__.py +0 -0
  164. swarmauri_standard-0.6.0/swarmauri_standard/toolkits/AccessibilityToolkit.py +28 -0
  165. swarmauri_standard-0.6.0/swarmauri_standard/toolkits/Toolkit.py +8 -0
  166. swarmauri_standard-0.6.0/swarmauri_standard/toolkits/__init__.py +14 -0
  167. swarmauri_standard-0.6.0/swarmauri_standard/tools/AdditionTool.py +37 -0
  168. swarmauri_standard-0.6.0/swarmauri_standard/tools/AutomatedReadabilityIndexTool.py +120 -0
  169. swarmauri_standard-0.6.0/swarmauri_standard/tools/CalculatorTool.py +96 -0
  170. swarmauri_standard-0.6.0/swarmauri_standard/tools/CodeExtractorTool.py +136 -0
  171. swarmauri_standard-0.6.0/swarmauri_standard/tools/CodeInterpreterTool.py +65 -0
  172. swarmauri_standard-0.6.0/swarmauri_standard/tools/ColemanLiauIndexTool.py +121 -0
  173. swarmauri_standard-0.6.0/swarmauri_standard/tools/FleschKincaidTool.py +168 -0
  174. swarmauri_standard-0.6.0/swarmauri_standard/tools/FleschReadingEaseTool.py +99 -0
  175. swarmauri_standard-0.6.0/swarmauri_standard/tools/GunningFogTool.py +150 -0
  176. swarmauri_standard-0.6.0/swarmauri_standard/tools/ImportMemoryModuleTool.py +92 -0
  177. swarmauri_standard-0.6.0/swarmauri_standard/tools/JSONRequestsTool.py +183 -0
  178. swarmauri_standard-0.6.0/swarmauri_standard/tools/MatplotlibCsvTool.py +78 -0
  179. swarmauri_standard-0.6.0/swarmauri_standard/tools/MatplotlibTool.py +120 -0
  180. swarmauri_standard-0.6.0/swarmauri_standard/tools/Parameter.py +12 -0
  181. swarmauri_standard-0.6.0/swarmauri_standard/tools/RequestsTool.py +175 -0
  182. swarmauri_standard-0.6.0/swarmauri_standard/tools/SentenceComplexityTool.py +80 -0
  183. swarmauri_standard-0.6.0/swarmauri_standard/tools/TemperatureConverterTool.py +71 -0
  184. swarmauri_standard-0.6.0/swarmauri_standard/tools/TestTool.py +32 -0
  185. swarmauri_standard-0.6.0/swarmauri_standard/tools/WeatherTool.py +36 -0
  186. swarmauri_standard-0.6.0/swarmauri_standard/tools/__init__.py +35 -0
  187. swarmauri_standard-0.6.0/swarmauri_standard/tracing/CallableTracer.py +38 -0
  188. swarmauri_standard-0.6.0/swarmauri_standard/tracing/ChainTracer.py +54 -0
  189. swarmauri_standard-0.6.0/swarmauri_standard/tracing/SimpleTraceContext.py +27 -0
  190. swarmauri_standard-0.6.0/swarmauri_standard/tracing/SimpleTracer.py +46 -0
  191. swarmauri_standard-0.6.0/swarmauri_standard/tracing/TracedVariable.py +30 -0
  192. swarmauri_standard-0.6.0/swarmauri_standard/tracing/VariableTracer.py +28 -0
  193. swarmauri_standard-0.6.0/swarmauri_standard/tracing/__init__.py +17 -0
  194. swarmauri_standard-0.6.0/swarmauri_standard/transports/PubSubTransport.py +60 -0
  195. swarmauri_standard-0.6.0/swarmauri_standard/transports/__init__.py +13 -0
  196. swarmauri_standard-0.6.0/swarmauri_standard/tts/HyperbolicTTS.py +166 -0
  197. swarmauri_standard-0.6.0/swarmauri_standard/tts/OpenaiTTS.py +240 -0
  198. swarmauri_standard-0.6.0/swarmauri_standard/tts/PlayhtTTS.py +390 -0
  199. swarmauri_standard-0.6.0/swarmauri_standard/tts/__init__.py +0 -0
  200. swarmauri_standard-0.6.0/swarmauri_standard/utils/__init__.py +0 -0
  201. swarmauri_standard-0.6.0/swarmauri_standard/utils/_get_subclasses.py +71 -0
  202. swarmauri_standard-0.6.0/swarmauri_standard/utils/_lazy_import.py +22 -0
  203. swarmauri_standard-0.6.0/swarmauri_standard/utils/apply_metaclass.py +4 -0
  204. swarmauri_standard-0.6.0/swarmauri_standard/utils/base64_encoder.py +17 -0
  205. swarmauri_standard-0.6.0/swarmauri_standard/utils/base64_to_file_path.py +9 -0
  206. swarmauri_standard-0.6.0/swarmauri_standard/utils/base64_to_img_url.py +42 -0
  207. swarmauri_standard-0.6.0/swarmauri_standard/utils/base64_to_in_memory_img.py +9 -0
  208. swarmauri_standard-0.6.0/swarmauri_standard/utils/decorate.py +30 -0
  209. swarmauri_standard-0.6.0/swarmauri_standard/utils/duration_manager.py +13 -0
  210. swarmauri_standard-0.6.0/swarmauri_standard/utils/file_path_to_base64.py +10 -0
  211. swarmauri_standard-0.6.0/swarmauri_standard/utils/file_path_to_img_url.py +43 -0
  212. swarmauri_standard-0.6.0/swarmauri_standard/utils/file_path_to_in_memory_img.py +6 -0
  213. swarmauri_standard-0.6.0/swarmauri_standard/utils/get_class_hash.py +36 -0
  214. swarmauri_standard-0.6.0/swarmauri_standard/utils/img_url_to_base64.py +12 -0
  215. swarmauri_standard-0.6.0/swarmauri_standard/utils/img_url_to_file_path.py +9 -0
  216. swarmauri_standard-0.6.0/swarmauri_standard/utils/img_url_to_in_memory_img.py +9 -0
  217. swarmauri_standard-0.6.0/swarmauri_standard/utils/in_memory_img_to_base64.py +9 -0
  218. swarmauri_standard-0.6.0/swarmauri_standard/utils/in_memory_img_to_file_path.py +5 -0
  219. swarmauri_standard-0.6.0/swarmauri_standard/utils/in_memory_img_to_img_url.py +49 -0
  220. swarmauri_standard-0.6.0/swarmauri_standard/utils/json_validator.py +19 -0
  221. swarmauri_standard-0.6.0/swarmauri_standard/utils/load_documents_from_folder.py +75 -0
  222. swarmauri_standard-0.6.0/swarmauri_standard/utils/load_documents_from_json.py +35 -0
  223. swarmauri_standard-0.6.0/swarmauri_standard/utils/memoize.py +19 -0
  224. swarmauri_standard-0.6.0/swarmauri_standard/utils/method_signature_extractor_decorator.py +111 -0
  225. swarmauri_standard-0.6.0/swarmauri_standard/utils/print_notebook_metadata.py +108 -0
  226. swarmauri_standard-0.6.0/swarmauri_standard/utils/retry_decorator.py +94 -0
  227. swarmauri_standard-0.6.0/swarmauri_standard/utils/sql_log.py +92 -0
  228. swarmauri_standard-0.6.0/swarmauri_standard/utils/timeout_wrapper.py +42 -0
  229. swarmauri_standard-0.6.0/swarmauri_standard/utils/tool_decorator.py +63 -0
  230. swarmauri_standard-0.6.0/swarmauri_standard/vector_stores/SqliteVectorStore.py +177 -0
  231. swarmauri_standard-0.6.0/swarmauri_standard/vector_stores/TfidfVectorStore.py +76 -0
  232. swarmauri_standard-0.6.0/swarmauri_standard/vector_stores/__init__.py +14 -0
  233. swarmauri_standard-0.6.0/swarmauri_standard/vectors/Vector.py +8 -0
  234. swarmauri_standard-0.6.0/swarmauri_standard/vectors/__init__.py +13 -0
  235. swarmauri_standard-0.6.0/swarmauri_standard/vlms/FalVLM.py +264 -0
  236. swarmauri_standard-0.6.0/swarmauri_standard/vlms/GroqVLM.py +398 -0
  237. swarmauri_standard-0.6.0/swarmauri_standard/vlms/HyperbolicVLM.py +400 -0
  238. swarmauri_standard-0.6.0/swarmauri_standard/vlms/__init__.py +0 -0
@@ -0,0 +1,201 @@
1
+ Apache License
2
+ Version 2.0, January 2004
3
+ http://www.apache.org/licenses/
4
+
5
+ TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
6
+
7
+ 1. Definitions.
8
+
9
+ "License" shall mean the terms and conditions for use, reproduction,
10
+ and distribution as defined by Sections 1 through 9 of this document.
11
+
12
+ "Licensor" shall mean the copyright owner or entity authorized by
13
+ the copyright owner that is granting the License.
14
+
15
+ "Legal Entity" shall mean the union of the acting entity and all
16
+ other entities that control, are controlled by, or are under common
17
+ control with that entity. For the purposes of this definition,
18
+ "control" means (i) the power, direct or indirect, to cause the
19
+ direction or management of such entity, whether by contract or
20
+ otherwise, or (ii) ownership of fifty percent (50%) or more of the
21
+ outstanding shares, or (iii) beneficial ownership of such entity.
22
+
23
+ "You" (or "Your") shall mean an individual or Legal Entity
24
+ exercising permissions granted by this License.
25
+
26
+ "Source" form shall mean the preferred form for making modifications,
27
+ including but not limited to software source code, documentation
28
+ source, and configuration files.
29
+
30
+ "Object" form shall mean any form resulting from mechanical
31
+ transformation or translation of a Source form, including but
32
+ not limited to compiled object code, generated documentation,
33
+ and conversions to other media types.
34
+
35
+ "Work" shall mean the work of authorship, whether in Source or
36
+ Object form, made available under the License, as indicated by a
37
+ copyright notice that is included in or attached to the work
38
+ (an example is provided in the Appendix below).
39
+
40
+ "Derivative Works" shall mean any work, whether in Source or Object
41
+ form, that is based on (or derived from) the Work and for which the
42
+ editorial revisions, annotations, elaborations, or other modifications
43
+ represent, as a whole, an original work of authorship. For the purposes
44
+ of this License, Derivative Works shall not include works that remain
45
+ separable from, or merely link (or bind by name) to the interfaces of,
46
+ the Work and Derivative Works thereof.
47
+
48
+ "Contribution" shall mean any work of authorship, including
49
+ the original version of the Work and any modifications or additions
50
+ to that Work or Derivative Works thereof, that is intentionally
51
+ submitted to Licensor for inclusion in the Work by the copyright owner
52
+ or by an individual or Legal Entity authorized to submit on behalf of
53
+ the copyright owner. For the purposes of this definition, "submitted"
54
+ means any form of electronic, verbal, or written communication sent
55
+ to the Licensor or its representatives, including but not limited to
56
+ communication on electronic mailing lists, source code control systems,
57
+ and issue tracking systems that are managed by, or on behalf of, the
58
+ Licensor for the purpose of discussing and improving the Work, but
59
+ excluding communication that is conspicuously marked or otherwise
60
+ designated in writing by the copyright owner as "Not a Contribution."
61
+
62
+ "Contributor" shall mean Licensor and any individual or Legal Entity
63
+ on behalf of whom a Contribution has been received by Licensor and
64
+ subsequently incorporated within the Work.
65
+
66
+ 2. Grant of Copyright License. Subject to the terms and conditions of
67
+ this License, each Contributor hereby grants to You a perpetual,
68
+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable
69
+ copyright license to reproduce, prepare Derivative Works of,
70
+ publicly display, publicly perform, sublicense, and distribute the
71
+ Work and such Derivative Works in Source or Object form.
72
+
73
+ 3. Grant of Patent License. Subject to the terms and conditions of
74
+ this License, each Contributor hereby grants to You a perpetual,
75
+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable
76
+ (except as stated in this section) patent license to make, have made,
77
+ use, offer to sell, sell, import, and otherwise transfer the Work,
78
+ where such license applies only to those patent claims licensable
79
+ by such Contributor that are necessarily infringed by their
80
+ Contribution(s) alone or by combination of their Contribution(s)
81
+ with the Work to which such Contribution(s) was submitted. If You
82
+ institute patent litigation against any entity (including a
83
+ cross-claim or counterclaim in a lawsuit) alleging that the Work
84
+ or a Contribution incorporated within the Work constitutes direct
85
+ or contributory patent infringement, then any patent licenses
86
+ granted to You under this License for that Work shall terminate
87
+ as of the date such litigation is filed.
88
+
89
+ 4. Redistribution. You may reproduce and distribute copies of the
90
+ Work or Derivative Works thereof in any medium, with or without
91
+ modifications, and in Source or Object form, provided that You
92
+ meet the following conditions:
93
+
94
+ (a) You must give any other recipients of the Work or
95
+ Derivative Works a copy of this License; and
96
+
97
+ (b) You must cause any modified files to carry prominent notices
98
+ stating that You changed the files; and
99
+
100
+ (c) You must retain, in the Source form of any Derivative Works
101
+ that You distribute, all copyright, patent, trademark, and
102
+ attribution notices from the Source form of the Work,
103
+ excluding those notices that do not pertain to any part of
104
+ the Derivative Works; and
105
+
106
+ (d) If the Work includes a "NOTICE" text file as part of its
107
+ distribution, then any Derivative Works that You distribute must
108
+ include a readable copy of the attribution notices contained
109
+ within such NOTICE file, excluding those notices that do not
110
+ pertain to any part of the Derivative Works, in at least one
111
+ of the following places: within a NOTICE text file distributed
112
+ as part of the Derivative Works; within the Source form or
113
+ documentation, if provided along with the Derivative Works; or,
114
+ within a display generated by the Derivative Works, if and
115
+ wherever such third-party notices normally appear. The contents
116
+ of the NOTICE file are for informational purposes only and
117
+ do not modify the License. You may add Your own attribution
118
+ notices within Derivative Works that You distribute, alongside
119
+ or as an addendum to the NOTICE text from the Work, provided
120
+ that such additional attribution notices cannot be construed
121
+ as modifying the License.
122
+
123
+ You may add Your own copyright statement to Your modifications and
124
+ may provide additional or different license terms and conditions
125
+ for use, reproduction, or distribution of Your modifications, or
126
+ for any such Derivative Works as a whole, provided Your use,
127
+ reproduction, and distribution of the Work otherwise complies with
128
+ the conditions stated in this License.
129
+
130
+ 5. Submission of Contributions. Unless You explicitly state otherwise,
131
+ any Contribution intentionally submitted for inclusion in the Work
132
+ by You to the Licensor shall be under the terms and conditions of
133
+ this License, without any additional terms or conditions.
134
+ Notwithstanding the above, nothing herein shall supersede or modify
135
+ the terms of any separate license agreement you may have executed
136
+ with Licensor regarding such Contributions.
137
+
138
+ 6. Trademarks. This License does not grant permission to use the trade
139
+ names, trademarks, service marks, or product names of the Licensor,
140
+ except as required for reasonable and customary use in describing the
141
+ origin of the Work and reproducing the content of the NOTICE file.
142
+
143
+ 7. Disclaimer of Warranty. Unless required by applicable law or
144
+ agreed to in writing, Licensor provides the Work (and each
145
+ Contributor provides its Contributions) on an "AS IS" BASIS,
146
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
147
+ implied, including, without limitation, any warranties or conditions
148
+ of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
149
+ PARTICULAR PURPOSE. You are solely responsible for determining the
150
+ appropriateness of using or redistributing the Work and assume any
151
+ risks associated with Your exercise of permissions under this License.
152
+
153
+ 8. Limitation of Liability. In no event and under no legal theory,
154
+ whether in tort (including negligence), contract, or otherwise,
155
+ unless required by applicable law (such as deliberate and grossly
156
+ negligent acts) or agreed to in writing, shall any Contributor be
157
+ liable to You for damages, including any direct, indirect, special,
158
+ incidental, or consequential damages of any character arising as a
159
+ result of this License or out of the use or inability to use the
160
+ Work (including but not limited to damages for loss of goodwill,
161
+ work stoppage, computer failure or malfunction, or any and all
162
+ other commercial damages or losses), even if such Contributor
163
+ has been advised of the possibility of such damages.
164
+
165
+ 9. Accepting Warranty or Additional Liability. While redistributing
166
+ the Work or Derivative Works thereof, You may choose to offer,
167
+ and charge a fee for, acceptance of support, warranty, indemnity,
168
+ or other liability obligations and/or rights consistent with this
169
+ License. However, in accepting such obligations, You may act only
170
+ on Your own behalf and on Your sole responsibility, not on behalf
171
+ of any other Contributor, and only if You agree to indemnify,
172
+ defend, and hold each Contributor harmless for any liability
173
+ incurred by, or claims asserted against, such Contributor by reason
174
+ of your accepting any such warranty or additional liability.
175
+
176
+ END OF TERMS AND CONDITIONS
177
+
178
+ APPENDIX: How to apply the Apache License to your work.
179
+
180
+ To apply the Apache License to your work, attach the following
181
+ boilerplate notice, with the fields enclosed by brackets "[]"
182
+ replaced with your own identifying information. (Don't include
183
+ the brackets!) The text should be enclosed in the appropriate
184
+ comment syntax for the file format. We also recommend that a
185
+ file or class name and description of purpose be included on the
186
+ same "printed page" as the copyright notice for easier
187
+ identification within third-party archives.
188
+
189
+ Copyright [2025] [Jacob Stewart @ Swarmauri]
190
+
191
+ Licensed under the Apache License, Version 2.0 (the "License");
192
+ you may not use this file except in compliance with the License.
193
+ You may obtain a copy of the License at
194
+
195
+ http://www.apache.org/licenses/LICENSE-2.0
196
+
197
+ Unless required by applicable law or agreed to in writing, software
198
+ distributed under the License is distributed on an "AS IS" BASIS,
199
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
200
+ See the License for the specific language governing permissions and
201
+ limitations under the License.
@@ -0,0 +1,84 @@
1
+ Metadata-Version: 2.3
2
+ Name: swarmauri-standard
3
+ Version: 0.6.0
4
+ Summary: This repository includes standard components within the Swarmauri framework.
5
+ License: Apache-2.0
6
+ Author: Jacob Stewart
7
+ Author-email: jacob@swarmauri.com
8
+ Requires-Python: >=3.10,<3.13
9
+ Classifier: License :: OSI Approved :: Apache Software License
10
+ Classifier: Programming Language :: Python :: 3
11
+ Classifier: Programming Language :: Python :: 3.10
12
+ Classifier: Programming Language :: Python :: 3.11
13
+ Classifier: Programming Language :: Python :: 3.12
14
+ Requires-Dist: Pillow (>=8.0,<11.0)
15
+ Requires-Dist: aiofiles (==24.1.0)
16
+ Requires-Dist: beautifulsoup4 (>=4.13.3,<5.0.0)
17
+ Requires-Dist: httpx (>=0.27.0,<0.28.0)
18
+ Requires-Dist: joblib (>=1.4.0,<2.0.0)
19
+ Requires-Dist: matplotlib (>=3.10.0,<4.0.0)
20
+ Requires-Dist: numpy
21
+ Requires-Dist: pandas
22
+ Requires-Dist: pydantic (>=2.9.2,<3.0.0)
23
+ Requires-Dist: requests (>=2.32.3,<3.0.0)
24
+ Requires-Dist: scikit-learn (>=1.6.1,<2.0.0)
25
+ Requires-Dist: scipy (>=1.15.2,<2.0.0)
26
+ Requires-Dist: swarmauri_base (>=0.6.1.dev13,<0.7.0)
27
+ Requires-Dist: swarmauri_core (>=0.6.1.dev13,<0.7.0)
28
+ Requires-Dist: toml (>=0.10.2,<0.11.0)
29
+ Requires-Dist: typing_extensions
30
+ Requires-Dist: yake (>=0.4.8,<0.5.0)
31
+ Project-URL: Repository, http://github.com/swarmauri/swarmauri-sdk
32
+ Description-Content-Type: text/markdown
33
+
34
+ ![Swarmauri Logo](https://res.cloudinary.com/dbjmpekvl/image/upload/v1730099724/Swarmauri-logo-lockup-2048x757_hww01w.png)
35
+
36
+ <div align="center">
37
+
38
+ ![PyPI - Downloads](https://img.shields.io/pypi/dm/swarmauri)
39
+ ![PyPI - Python Version](https://img.shields.io/pypi/pyversions/swarmauri)
40
+ ![PyPI - License](https://img.shields.io/pypi/l/swarmauri)
41
+ ![PyPI - Version](https://img.shields.io/pypi/v/swarmauri?label=swarmauri_standard&color=green)
42
+
43
+ </div>
44
+
45
+ ---
46
+ # Swarmauri SDK
47
+
48
+ The Swarmauri SDK offers a comprehensive suite of tools designed for building distributed, extensible systems using the Swarmauri framework.
49
+
50
+ ## Core
51
+ - **Core Interfaces**: Define the fundamental communication and data-sharing protocols between components in a Swarmauri-based system.
52
+
53
+ ## Standard
54
+ - **Base Classes**: Provide a foundation for constructing Swarmauri components, with standardized methods and properties.
55
+ - **Mixins**: Reusable code fragments designed to be integrated into various classes, offering shared functionality across different components.
56
+ - **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.**
57
+
58
+ ## Community
59
+ - **Third-Party Plug-in Integration**: Concrete classes designed to extend the framework’s capabilities by utilizing third-party libraries and plugins.
60
+ - **Open Source Contributions**: A collaborative space for developers to contribute new components, plug-ins, and features.
61
+
62
+ ## Experimental
63
+ - **In-Development Components**: Early-stage features and components that push the boundaries of the Swarmauri framework, offering innovative solutions that are still in testing phases.
64
+
65
+ # Features
66
+
67
+ - **Polymorphism**: Allows for dynamic behavior switching between components, enabling flexible, context-aware system behavior.
68
+ - **Discriminated Unions**: Provides a robust method for handling multiple possible object types in a type-safe manner.
69
+ - **Serialization**: Efficiently encode and decode data for transmission across different environments and system components, with support for both standard and custom serialization formats.
70
+ - **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.
71
+
72
+ ## Use Cases
73
+
74
+ - **Modular Systems**: Develop scalable, pluggable systems that can evolve over time by adding or modifying components without disrupting the entire ecosystem.
75
+ - **Distributed Architectures**: Build systems with distributed nodes that seamlessly communicate using the SDK’s standardized interfaces.
76
+ - **Third-Party Integrations**: Extend the system's capabilities by easily incorporating third-party tools, libraries, and services.
77
+ - **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.
78
+
79
+ # Future Development
80
+
81
+ 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.
82
+
83
+
84
+
@@ -0,0 +1,50 @@
1
+ ![Swarmauri Logo](https://res.cloudinary.com/dbjmpekvl/image/upload/v1730099724/Swarmauri-logo-lockup-2048x757_hww01w.png)
2
+
3
+ <div align="center">
4
+
5
+ ![PyPI - Downloads](https://img.shields.io/pypi/dm/swarmauri)
6
+ ![PyPI - Python Version](https://img.shields.io/pypi/pyversions/swarmauri)
7
+ ![PyPI - License](https://img.shields.io/pypi/l/swarmauri)
8
+ ![PyPI - Version](https://img.shields.io/pypi/v/swarmauri?label=swarmauri_standard&color=green)
9
+
10
+ </div>
11
+
12
+ ---
13
+ # Swarmauri SDK
14
+
15
+ The Swarmauri SDK offers a comprehensive suite of tools designed for building distributed, extensible systems using the Swarmauri framework.
16
+
17
+ ## Core
18
+ - **Core Interfaces**: Define the fundamental communication and data-sharing protocols between components in a Swarmauri-based system.
19
+
20
+ ## Standard
21
+ - **Base Classes**: Provide a foundation for constructing Swarmauri components, with standardized methods and properties.
22
+ - **Mixins**: Reusable code fragments designed to be integrated into various classes, offering shared functionality across different components.
23
+ - **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.**
24
+
25
+ ## Community
26
+ - **Third-Party Plug-in Integration**: Concrete classes designed to extend the framework’s capabilities by utilizing third-party libraries and plugins.
27
+ - **Open Source Contributions**: A collaborative space for developers to contribute new components, plug-ins, and features.
28
+
29
+ ## Experimental
30
+ - **In-Development Components**: Early-stage features and components that push the boundaries of the Swarmauri framework, offering innovative solutions that are still in testing phases.
31
+
32
+ # Features
33
+
34
+ - **Polymorphism**: Allows for dynamic behavior switching between components, enabling flexible, context-aware system behavior.
35
+ - **Discriminated Unions**: Provides a robust method for handling multiple possible object types in a type-safe manner.
36
+ - **Serialization**: Efficiently encode and decode data for transmission across different environments and system components, with support for both standard and custom serialization formats.
37
+ - **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.
38
+
39
+ ## Use Cases
40
+
41
+ - **Modular Systems**: Develop scalable, pluggable systems that can evolve over time by adding or modifying components without disrupting the entire ecosystem.
42
+ - **Distributed Architectures**: Build systems with distributed nodes that seamlessly communicate using the SDK’s standardized interfaces.
43
+ - **Third-Party Integrations**: Extend the system's capabilities by easily incorporating third-party tools, libraries, and services.
44
+ - **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.
45
+
46
+ # Future Development
47
+
48
+ 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.
49
+
50
+
@@ -0,0 +1,91 @@
1
+ [tool.poetry]
2
+ name = "swarmauri-standard"
3
+ version = "0.6.0"
4
+ description = "This repository includes standard components within the Swarmauri framework."
5
+ authors = ["Jacob Stewart <jacob@swarmauri.com>"]
6
+ license = "Apache-2.0"
7
+ readme = "README.md"
8
+ repository = "http://github.com/swarmauri/swarmauri-sdk"
9
+ classifiers = [
10
+ "License :: OSI Approved :: Apache Software License",
11
+ "Programming Language :: Python :: 3.10",
12
+ "Programming Language :: Python :: 3.11",
13
+ "Programming Language :: Python :: 3.12"
14
+ ]
15
+
16
+ [tool.poetry.dependencies]
17
+ python = ">=3.10,<3.13"
18
+
19
+ # Swarmauri
20
+ swarmauri_core = {version = "^0.6.1.dev13"}
21
+ swarmauri_base = {version = "^0.6.1.dev13"}
22
+
23
+ # Dependencies
24
+ toml = "^0.10.2"
25
+ httpx = "^0.27.0"
26
+ numpy = "*"
27
+ pandas = "*"
28
+ pydantic = "^2.9.2"
29
+ typing_extensions = "*"
30
+
31
+ #####################
32
+ # Technical Debt
33
+ #
34
+ #####################
35
+ # Should only appear on a standalone package
36
+ scikit-learn = "^1.6.1"
37
+ matplotlib = "^3.10.0"
38
+ Pillow = ">=8.0,<11.0"
39
+ beautifulsoup4 = "^4.13.3"
40
+ scipy = "^1.15.2"
41
+ yake = "^0.4.8"
42
+
43
+ # Are we dependent upon this forever?
44
+ aiofiles = { version = "24.1.0"}
45
+
46
+ # We should remove and only rely on httpx
47
+ requests = "^2.32.3"
48
+
49
+ # what requires joblib?
50
+ joblib = "^1.4.0"
51
+ ###########################
52
+
53
+
54
+
55
+ [tool.poetry.group.dev.dependencies]
56
+ flake8 = "^7.0"
57
+ pytest = "^8.0"
58
+ pytest-asyncio = ">=0.23.8"
59
+ pytest-timeout = "^2.3.1"
60
+ pytest-xdist = "^3.6.1"
61
+ pytest-json-report = "^1.5.0"
62
+ python-dotenv = "^1.0.0"
63
+ jsonschema = "^4.18.5"
64
+ ipython = "^8.28.0"
65
+ requests = "^2.32.3"
66
+
67
+ [build-system]
68
+ requires = ["poetry-core>=1.0.0"]
69
+ build-backend = "poetry.core.masonry.api"
70
+
71
+ [tool.pytest.ini_options]
72
+ norecursedirs = ["combined", "scripts"]
73
+ asyncio_mode = "auto"
74
+
75
+ markers = [
76
+ "test: standard test",
77
+ "unit: Unit tests",
78
+ "integration: Integration tests",
79
+ "i9n: Integration tests",
80
+ "r8n: Regression tests",
81
+ "acceptance: Acceptance tests",
82
+ "experimental: Experimental tests",
83
+ "timeout: mark test to timeout after X seconds",
84
+ ]
85
+
86
+ log_cli = true
87
+ log_cli_level = "INFO"
88
+ log_cli_format = "%(asctime)s [%(levelname)s] %(message)s"
89
+ log_cli_date_format = "%Y-%m-%d %H:%M:%S"
90
+
91
+ asyncio_default_fixture_loop_scope = "function"
@@ -0,0 +1,37 @@
1
+ # Standard Library
2
+
3
+
4
+ The Standard Library extends the Core Library with concrete implementations of models, agents, tools, parsers, and more. It aims to provide ready-to-use components that can be easily integrated into machine learning projects.
5
+
6
+ ## Features
7
+
8
+ - **Predefined Models and Agents**: Implements standard models and agents ready for use.
9
+ - **Toolkit**: A collection of tools for various tasks (e.g., weather information, math operations).
10
+ - **Parsers Implementations**: Various parsers for text data, including HTML and CSV parsers.
11
+ - **Conversations and Chunkers**: Manage conversation histories and chunk text data.
12
+ - **Vectorizers**: Transform text data into vector representations.
13
+ - **Document Stores and Vector Stores**: Concrete implementations for storing and retrieving data.
14
+
15
+ ## Getting Started
16
+
17
+ To make the best use of the Standard Library, first ensure that the Core Library is set up in your project as the Standard Library builds upon it.
18
+
19
+ ```python
20
+ # Example usage of a concrete model from the Standard Library
21
+ from swarmauri_standard.llms.OpenAIModel import OpenAIModel
22
+
23
+ # Initialize the model with necessary configuration
24
+ model = OpenAIModel(api_key="your_api_key_here")
25
+ ```
26
+
27
+ ## Documentation
28
+
29
+ For more detailed guides and API documentation, check the [Docs](/docs) directory within the library. You'll find examples, configuration options, and best practices for utilizing the provided components.
30
+
31
+ ## Contributing
32
+
33
+ Your contributions can help the Standard Library grow! Whether it's adding new tools, improving models, or writing documentation, we appreciate your help. Please send a pull request with your contributions.
34
+
35
+ ## License
36
+
37
+ Please see the `LICENSE` file in the repository for details.
@@ -0,0 +1,44 @@
1
+ __long_desc__ = """
2
+ # Swarmauri Standard SDK
3
+
4
+ The Swarmauri Standard SDK offers a comprehensive suite of tools designed for building distributed, extensible systems using the Swarmauri framework.
5
+
6
+ ## Standard
7
+ - **Base Classes**: Provide a foundation for constructing Swarmauri components, with standardized methods and properties.
8
+ - **Mixins**: Reusable code fragments designed to be integrated into various classes, offering shared functionality across different components.
9
+ - **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.**
10
+
11
+ # Features
12
+
13
+ - **Polymorphism**: Allows for dynamic behavior switching between components, enabling flexible, context-aware system behavior.
14
+ - **Discriminated Unions**: Provides a robust method for handling multiple possible object types in a type-safe manner.
15
+ - **Serialization**: Efficiently encode and decode data for transmission across different environments and system components, with support for both standard and custom serialization formats.
16
+ - **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.
17
+
18
+ ## Use Cases
19
+
20
+ - **Modular Systems**: Develop scalable, pluggable systems that can evolve over time by adding or modifying components without disrupting the entire ecosystem.
21
+ - **Distributed Architectures**: Build systems with distributed nodes that seamlessly communicate using the SDK’s standardized interfaces.
22
+ - **Third-Party Integrations**: Extend the system's capabilities by easily incorporating third-party tools, libraries, and services.
23
+ - **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.
24
+
25
+ # Future Development
26
+
27
+ 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.
28
+
29
+ Visit us at: https://swarmauri.com
30
+ Follow us at: https://github.com/swarmauri
31
+ """
32
+
33
+ try:
34
+ # For Python 3.8 and newer
35
+ from importlib.metadata import version, PackageNotFoundError
36
+ except ImportError:
37
+ # For older Python versions, use the backport
38
+ from importlib_metadata import version, PackageNotFoundError
39
+
40
+ try:
41
+ __version__ = version("swarmauri_standard")
42
+ except PackageNotFoundError:
43
+ # If the package is not installed (for example, during development)
44
+ __version__ = "0.0.0"
@@ -0,0 +1,37 @@
1
+ from typing import Any, Optional, Dict, Literal
2
+
3
+ from swarmauri_standard.conversations.MaxSystemContextConversation import (
4
+ MaxSystemContextConversation,
5
+ )
6
+ from swarmauri_standard.messages.HumanMessage import HumanMessage
7
+
8
+ from swarmauri_base.agents.AgentBase import AgentBase
9
+ from swarmauri_base.conversations.ConversationBase import ConversationBase
10
+ from swarmauri_core.ComponentBase import SubclassUnion, ComponentBase
11
+
12
+
13
+ @ComponentBase.register_type(AgentBase, "QAAgent")
14
+ class QAAgent(AgentBase):
15
+ conversation: SubclassUnion[ConversationBase] = MaxSystemContextConversation(
16
+ max_size=2
17
+ )
18
+ type: Literal["QAAgent"] = "QAAgent"
19
+
20
+ def exec(
21
+ self, input_str: Optional[str] = "", llm_kwargs: Optional[Dict] = {}
22
+ ) -> Any:
23
+ llm_kwargs = llm_kwargs or self.llm_kwargs
24
+
25
+ self.conversation.add_message(HumanMessage(content=input_str))
26
+ self.llm.predict(conversation=self.conversation, **llm_kwargs)
27
+
28
+ return self.conversation.get_last().content
29
+
30
+ async def aexec(
31
+ self, input_str: Optional[str] = "", llm_kwargs: Optional[Dict] = {}
32
+ ) -> Any:
33
+ llm_kwargs = llm_kwargs or self.llm_kwargs
34
+
35
+ self.conversation.add_message(HumanMessage(content=input_str))
36
+ await self.llm.apredict(conversation=self.conversation, **llm_kwargs)
37
+ return self.conversation.get_last().content