swarmauri-base 0.11.0.dev6__tar.gz → 0.11.0.dev11__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 (298) hide show
  1. {swarmauri_base-0.11.0.dev6 → swarmauri_base-0.11.0.dev11}/PKG-INFO +24 -2
  2. {swarmauri_base-0.11.0.dev6 → swarmauri_base-0.11.0.dev11}/README.md +21 -1
  3. {swarmauri_base-0.11.0.dev6 → swarmauri_base-0.11.0.dev11}/pyproject.toml +4 -3
  4. {swarmauri_base-0.11.0.dev6 → swarmauri_base-0.11.0.dev11}/swarmauri_base/ComponentBase.py +1 -0
  5. swarmauri_base-0.11.0.dev11/swarmauri_base/agents/AgentCompactionMixin.py +89 -0
  6. swarmauri_base-0.11.0.dev11/swarmauri_base/conversations/ConversationCompactionMixin.py +126 -0
  7. swarmauri_base-0.11.0.dev11/swarmauri_base/git_filters/config.py +27 -0
  8. {swarmauri_base-0.11.0.dev6 → swarmauri_base-0.11.0.dev11}/swarmauri_base/middlewares/MiddlewareBase.py +3 -10
  9. swarmauri_base-0.11.0.dev11/swarmauri_base/run_stores/RunStoreBase.py +51 -0
  10. swarmauri_base-0.11.0.dev11/swarmauri_base/run_stores/__init__.py +3 -0
  11. swarmauri_base-0.11.0.dev11/swarmauri_base/tts/HttpTTSMixin.py +165 -0
  12. swarmauri_base-0.11.0.dev11/swarmauri_base/tts/JsonAudioTTSMixin.py +67 -0
  13. swarmauri_base-0.11.0.dev11/swarmauri_base/tts/__init__.py +5 -0
  14. swarmauri_base-0.11.0.dev6/swarmauri_base/tts/__init__.py +0 -3
  15. {swarmauri_base-0.11.0.dev6 → swarmauri_base-0.11.0.dev11}/LICENSE +0 -0
  16. {swarmauri_base-0.11.0.dev6 → swarmauri_base-0.11.0.dev11}/swarmauri_base/DynamicBase.py +0 -0
  17. {swarmauri_base-0.11.0.dev6 → swarmauri_base-0.11.0.dev11}/swarmauri_base/LoggerMixin.py +0 -0
  18. {swarmauri_base-0.11.0.dev6 → swarmauri_base-0.11.0.dev11}/swarmauri_base/ObserveBase.py +0 -0
  19. {swarmauri_base-0.11.0.dev6 → swarmauri_base-0.11.0.dev11}/swarmauri_base/ServiceMixin.py +0 -0
  20. {swarmauri_base-0.11.0.dev6 → swarmauri_base-0.11.0.dev11}/swarmauri_base/TomlMixin.py +0 -0
  21. {swarmauri_base-0.11.0.dev6 → swarmauri_base-0.11.0.dev11}/swarmauri_base/YamlMixin.py +0 -0
  22. {swarmauri_base-0.11.0.dev6 → swarmauri_base-0.11.0.dev11}/swarmauri_base/__init__.py +0 -0
  23. {swarmauri_base-0.11.0.dev6 → swarmauri_base-0.11.0.dev11}/swarmauri_base/agents/AgentBase.py +0 -0
  24. {swarmauri_base-0.11.0.dev6 → swarmauri_base-0.11.0.dev11}/swarmauri_base/agents/AgentConversationMixin.py +0 -0
  25. {swarmauri_base-0.11.0.dev6 → swarmauri_base-0.11.0.dev11}/swarmauri_base/agents/AgentRetrieveMixin.py +0 -0
  26. {swarmauri_base-0.11.0.dev6 → swarmauri_base-0.11.0.dev11}/swarmauri_base/agents/AgentSystemContextMixin.py +0 -0
  27. {swarmauri_base-0.11.0.dev6 → swarmauri_base-0.11.0.dev11}/swarmauri_base/agents/AgentToolMixin.py +0 -0
  28. {swarmauri_base-0.11.0.dev6 → swarmauri_base-0.11.0.dev11}/swarmauri_base/agents/AgentVectorStoreMixin.py +0 -0
  29. {swarmauri_base-0.11.0.dev6 → swarmauri_base-0.11.0.dev11}/swarmauri_base/agents/RealtimeAgentBase.py +0 -0
  30. {swarmauri_base-0.11.0.dev6 → swarmauri_base-0.11.0.dev11}/swarmauri_base/agents/RealtimeInputAdapterBase.py +0 -0
  31. {swarmauri_base-0.11.0.dev6 → swarmauri_base-0.11.0.dev11}/swarmauri_base/agents/RealtimeOutputAdapterBase.py +0 -0
  32. {swarmauri_base-0.11.0.dev6 → swarmauri_base-0.11.0.dev11}/swarmauri_base/agents/__init__.py +0 -0
  33. {swarmauri_base-0.11.0.dev6 → swarmauri_base-0.11.0.dev11}/swarmauri_base/auth_idp/OAuth20AppClientBase.py +0 -0
  34. {swarmauri_base-0.11.0.dev6 → swarmauri_base-0.11.0.dev11}/swarmauri_base/auth_idp/OAuth20LoginBase.py +0 -0
  35. {swarmauri_base-0.11.0.dev6 → swarmauri_base-0.11.0.dev11}/swarmauri_base/auth_idp/OAuth21AppClientBase.py +0 -0
  36. {swarmauri_base-0.11.0.dev6 → swarmauri_base-0.11.0.dev11}/swarmauri_base/auth_idp/OAuth21LoginBase.py +0 -0
  37. {swarmauri_base-0.11.0.dev6 → swarmauri_base-0.11.0.dev11}/swarmauri_base/auth_idp/OIDC10AppClientBase.py +0 -0
  38. {swarmauri_base-0.11.0.dev6 → swarmauri_base-0.11.0.dev11}/swarmauri_base/auth_idp/OIDC10LoginBase.py +0 -0
  39. {swarmauri_base-0.11.0.dev6 → swarmauri_base-0.11.0.dev11}/swarmauri_base/auth_idp/__init__.py +0 -0
  40. {swarmauri_base-0.11.0.dev6 → swarmauri_base-0.11.0.dev11}/swarmauri_base/auth_idp/http.py +0 -0
  41. {swarmauri_base-0.11.0.dev6 → swarmauri_base-0.11.0.dev11}/swarmauri_base/auth_idp/utils.py +0 -0
  42. {swarmauri_base-0.11.0.dev6 → swarmauri_base-0.11.0.dev11}/swarmauri_base/billing/BalanceTransfersMixin.py +0 -0
  43. {swarmauri_base-0.11.0.dev6 → swarmauri_base-0.11.0.dev11}/swarmauri_base/billing/BillingProviderBase.py +0 -0
  44. {swarmauri_base-0.11.0.dev6 → swarmauri_base-0.11.0.dev11}/swarmauri_base/billing/CustomersMixin.py +0 -0
  45. {swarmauri_base-0.11.0.dev6 → swarmauri_base-0.11.0.dev11}/swarmauri_base/billing/HostedCheckoutMixin.py +0 -0
  46. {swarmauri_base-0.11.0.dev6 → swarmauri_base-0.11.0.dev11}/swarmauri_base/billing/InvoicingMixin.py +0 -0
  47. {swarmauri_base-0.11.0.dev6 → swarmauri_base-0.11.0.dev11}/swarmauri_base/billing/MarketplaceMixin.py +0 -0
  48. {swarmauri_base-0.11.0.dev6 → swarmauri_base-0.11.0.dev11}/swarmauri_base/billing/OnlinePaymentsMixin.py +0 -0
  49. {swarmauri_base-0.11.0.dev6 → swarmauri_base-0.11.0.dev11}/swarmauri_base/billing/PaymentMethodsMixin.py +0 -0
  50. {swarmauri_base-0.11.0.dev6 → swarmauri_base-0.11.0.dev11}/swarmauri_base/billing/PayoutsMixin.py +0 -0
  51. {swarmauri_base-0.11.0.dev6 → swarmauri_base-0.11.0.dev11}/swarmauri_base/billing/ProductsPricesMixin.py +0 -0
  52. {swarmauri_base-0.11.0.dev6 → swarmauri_base-0.11.0.dev11}/swarmauri_base/billing/PromotionsMixin.py +0 -0
  53. {swarmauri_base-0.11.0.dev6 → swarmauri_base-0.11.0.dev11}/swarmauri_base/billing/RefundsMixin.py +0 -0
  54. {swarmauri_base-0.11.0.dev6 → swarmauri_base-0.11.0.dev11}/swarmauri_base/billing/ReportsMixin.py +0 -0
  55. {swarmauri_base-0.11.0.dev6 → swarmauri_base-0.11.0.dev11}/swarmauri_base/billing/RiskMixin.py +0 -0
  56. {swarmauri_base-0.11.0.dev6 → swarmauri_base-0.11.0.dev11}/swarmauri_base/billing/SubscriptionsMixin.py +0 -0
  57. {swarmauri_base-0.11.0.dev6 → swarmauri_base-0.11.0.dev11}/swarmauri_base/billing/WebhooksMixin.py +0 -0
  58. {swarmauri_base-0.11.0.dev6 → swarmauri_base-0.11.0.dev11}/swarmauri_base/billing/__init__.py +0 -0
  59. {swarmauri_base-0.11.0.dev6 → swarmauri_base-0.11.0.dev11}/swarmauri_base/billing/mixins.py +0 -0
  60. {swarmauri_base-0.11.0.dev6 → swarmauri_base-0.11.0.dev11}/swarmauri_base/billing/refs.py +0 -0
  61. {swarmauri_base-0.11.0.dev6 → swarmauri_base-0.11.0.dev11}/swarmauri_base/billing/specs.py +0 -0
  62. {swarmauri_base-0.11.0.dev6 → swarmauri_base-0.11.0.dev11}/swarmauri_base/billing/utils.py +0 -0
  63. {swarmauri_base-0.11.0.dev6 → swarmauri_base-0.11.0.dev11}/swarmauri_base/certs/CertServiceBase.py +0 -0
  64. {swarmauri_base-0.11.0.dev6 → swarmauri_base-0.11.0.dev11}/swarmauri_base/certs/__init__.py +0 -0
  65. {swarmauri_base-0.11.0.dev6 → swarmauri_base-0.11.0.dev11}/swarmauri_base/chains/ChainBase.py +0 -0
  66. {swarmauri_base-0.11.0.dev6 → swarmauri_base-0.11.0.dev11}/swarmauri_base/chains/ChainContextBase.py +0 -0
  67. {swarmauri_base-0.11.0.dev6 → swarmauri_base-0.11.0.dev11}/swarmauri_base/chains/ChainStepBase.py +0 -0
  68. {swarmauri_base-0.11.0.dev6 → swarmauri_base-0.11.0.dev11}/swarmauri_base/chains/PromptContextChainBase.py +0 -0
  69. {swarmauri_base-0.11.0.dev6 → swarmauri_base-0.11.0.dev11}/swarmauri_base/chains/__init__.py +0 -0
  70. {swarmauri_base-0.11.0.dev6 → swarmauri_base-0.11.0.dev11}/swarmauri_base/chunkers/ChunkerBase.py +0 -0
  71. {swarmauri_base-0.11.0.dev6 → swarmauri_base-0.11.0.dev11}/swarmauri_base/chunkers/__init__.py +0 -0
  72. {swarmauri_base-0.11.0.dev6 → swarmauri_base-0.11.0.dev11}/swarmauri_base/cipher_suites/CipherSuiteBase.py +0 -0
  73. {swarmauri_base-0.11.0.dev6 → swarmauri_base-0.11.0.dev11}/swarmauri_base/cipher_suites/__init__.py +0 -0
  74. {swarmauri_base-0.11.0.dev6 → swarmauri_base-0.11.0.dev11}/swarmauri_base/conversations/ConversationBase.py +0 -0
  75. {swarmauri_base-0.11.0.dev6 → swarmauri_base-0.11.0.dev11}/swarmauri_base/conversations/ConversationSystemContextMixin.py +0 -0
  76. {swarmauri_base-0.11.0.dev6 → swarmauri_base-0.11.0.dev11}/swarmauri_base/conversations/__init__.py +0 -0
  77. {swarmauri_base-0.11.0.dev6 → swarmauri_base-0.11.0.dev11}/swarmauri_base/crypto/CryptoBase.py +0 -0
  78. {swarmauri_base-0.11.0.dev6 → swarmauri_base-0.11.0.dev11}/swarmauri_base/crypto/__init__.py +0 -0
  79. {swarmauri_base-0.11.0.dev6 → swarmauri_base-0.11.0.dev11}/swarmauri_base/dataconnectors/DataConnectorBase.py +0 -0
  80. {swarmauri_base-0.11.0.dev6 → swarmauri_base-0.11.0.dev11}/swarmauri_base/dataconnectors/__init__.py +0 -0
  81. {swarmauri_base-0.11.0.dev6 → swarmauri_base-0.11.0.dev11}/swarmauri_base/distances/DistanceBase.py +0 -0
  82. {swarmauri_base-0.11.0.dev6 → swarmauri_base-0.11.0.dev11}/swarmauri_base/distances/VisionDistanceBase.py +0 -0
  83. {swarmauri_base-0.11.0.dev6 → swarmauri_base-0.11.0.dev11}/swarmauri_base/distances/__init__.py +0 -0
  84. {swarmauri_base-0.11.0.dev6 → swarmauri_base-0.11.0.dev11}/swarmauri_base/document_stores/DocumentStoreBase.py +0 -0
  85. {swarmauri_base-0.11.0.dev6 → swarmauri_base-0.11.0.dev11}/swarmauri_base/document_stores/DocumentStoreRetrieveBase.py +0 -0
  86. {swarmauri_base-0.11.0.dev6 → swarmauri_base-0.11.0.dev11}/swarmauri_base/document_stores/__init__.py +0 -0
  87. {swarmauri_base-0.11.0.dev6 → swarmauri_base-0.11.0.dev11}/swarmauri_base/documents/DocumentBase.py +0 -0
  88. {swarmauri_base-0.11.0.dev6 → swarmauri_base-0.11.0.dev11}/swarmauri_base/documents/__init__.py +0 -0
  89. {swarmauri_base-0.11.0.dev6 → swarmauri_base-0.11.0.dev11}/swarmauri_base/embeddings/EmbeddingBase.py +0 -0
  90. {swarmauri_base-0.11.0.dev6 → swarmauri_base-0.11.0.dev11}/swarmauri_base/embeddings/VisionEmbeddingBase.py +0 -0
  91. {swarmauri_base-0.11.0.dev6 → swarmauri_base-0.11.0.dev11}/swarmauri_base/embeddings/__init__.py +0 -0
  92. {swarmauri_base-0.11.0.dev6 → swarmauri_base-0.11.0.dev11}/swarmauri_base/ensembles/EnsembleBase.py +0 -0
  93. {swarmauri_base-0.11.0.dev6 → swarmauri_base-0.11.0.dev11}/swarmauri_base/ensembles/__init__.py +0 -0
  94. {swarmauri_base-0.11.0.dev6 → swarmauri_base-0.11.0.dev11}/swarmauri_base/evaluator_pools/EvaluatorPoolBase.py +0 -0
  95. {swarmauri_base-0.11.0.dev6 → swarmauri_base-0.11.0.dev11}/swarmauri_base/evaluator_pools/__init__.py +0 -0
  96. {swarmauri_base-0.11.0.dev6 → swarmauri_base-0.11.0.dev11}/swarmauri_base/evaluator_results/EvalResultBase.py +0 -0
  97. {swarmauri_base-0.11.0.dev6 → swarmauri_base-0.11.0.dev11}/swarmauri_base/evaluator_results/__init__.py +0 -0
  98. {swarmauri_base-0.11.0.dev6 → swarmauri_base-0.11.0.dev11}/swarmauri_base/evaluators/EvaluatorBase.py +0 -0
  99. {swarmauri_base-0.11.0.dev6 → swarmauri_base-0.11.0.dev11}/swarmauri_base/evaluators/__init__.py +0 -0
  100. {swarmauri_base-0.11.0.dev6 → swarmauri_base-0.11.0.dev11}/swarmauri_base/factories/FactoryBase.py +0 -0
  101. {swarmauri_base-0.11.0.dev6 → swarmauri_base-0.11.0.dev11}/swarmauri_base/factories/__init__.py +0 -0
  102. {swarmauri_base-0.11.0.dev6 → swarmauri_base-0.11.0.dev11}/swarmauri_base/git_filters/GitFilterBase.py +0 -0
  103. {swarmauri_base-0.11.0.dev6 → swarmauri_base-0.11.0.dev11}/swarmauri_base/git_filters/__init__.py +0 -0
  104. {swarmauri_base-0.11.0.dev6 → swarmauri_base-0.11.0.dev11}/swarmauri_base/glogging.py +0 -0
  105. {swarmauri_base-0.11.0.dev6 → swarmauri_base-0.11.0.dev11}/swarmauri_base/image_gens/ImageGenBase.py +0 -0
  106. {swarmauri_base-0.11.0.dev6 → swarmauri_base-0.11.0.dev11}/swarmauri_base/image_gens/__init__.py +0 -0
  107. {swarmauri_base-0.11.0.dev6 → swarmauri_base-0.11.0.dev11}/swarmauri_base/inner_products/InnerProductBase.py +0 -0
  108. {swarmauri_base-0.11.0.dev6 → swarmauri_base-0.11.0.dev11}/swarmauri_base/inner_products/__init__.py +0 -0
  109. {swarmauri_base-0.11.0.dev6 → swarmauri_base-0.11.0.dev11}/swarmauri_base/key_providers/KeyProviderBase.py +0 -0
  110. {swarmauri_base-0.11.0.dev6 → swarmauri_base-0.11.0.dev11}/swarmauri_base/key_providers/__init__.py +0 -0
  111. {swarmauri_base-0.11.0.dev6 → swarmauri_base-0.11.0.dev11}/swarmauri_base/key_providers/loaders.py +0 -0
  112. {swarmauri_base-0.11.0.dev6 → swarmauri_base-0.11.0.dev11}/swarmauri_base/live_models/LiveCapabilitiesBase.py +0 -0
  113. {swarmauri_base-0.11.0.dev6 → swarmauri_base-0.11.0.dev11}/swarmauri_base/live_models/LiveConfigBase.py +0 -0
  114. {swarmauri_base-0.11.0.dev6 → swarmauri_base-0.11.0.dev11}/swarmauri_base/live_models/LiveCorrelation.py +0 -0
  115. {swarmauri_base-0.11.0.dev6 → swarmauri_base-0.11.0.dev11}/swarmauri_base/live_models/LiveEventBase.py +0 -0
  116. {swarmauri_base-0.11.0.dev6 → swarmauri_base-0.11.0.dev11}/swarmauri_base/live_models/LiveInputBase.py +0 -0
  117. {swarmauri_base-0.11.0.dev6 → swarmauri_base-0.11.0.dev11}/swarmauri_base/live_models/LiveModelBase.py +0 -0
  118. {swarmauri_base-0.11.0.dev6 → swarmauri_base-0.11.0.dev11}/swarmauri_base/live_models/LiveSessionBase.py +0 -0
  119. {swarmauri_base-0.11.0.dev6 → swarmauri_base-0.11.0.dev11}/swarmauri_base/live_models/LiveSessionRuntime.py +0 -0
  120. {swarmauri_base-0.11.0.dev6 → swarmauri_base-0.11.0.dev11}/swarmauri_base/live_models/LiveSessionState.py +0 -0
  121. {swarmauri_base-0.11.0.dev6 → swarmauri_base-0.11.0.dev11}/swarmauri_base/live_models/SyncLiveSessionBase.py +0 -0
  122. {swarmauri_base-0.11.0.dev6 → swarmauri_base-0.11.0.dev11}/swarmauri_base/live_models/__init__.py +0 -0
  123. {swarmauri_base-0.11.0.dev6 → swarmauri_base-0.11.0.dev11}/swarmauri_base/live_models/events/AudioDeltaEvent.py +0 -0
  124. {swarmauri_base-0.11.0.dev6 → swarmauri_base-0.11.0.dev11}/swarmauri_base/live_models/events/InputTranscriptDeltaEvent.py +0 -0
  125. {swarmauri_base-0.11.0.dev6 → swarmauri_base-0.11.0.dev11}/swarmauri_base/live_models/events/InterruptionEvent.py +0 -0
  126. {swarmauri_base-0.11.0.dev6 → swarmauri_base-0.11.0.dev11}/swarmauri_base/live_models/events/OutputTranscriptDeltaEvent.py +0 -0
  127. {swarmauri_base-0.11.0.dev6 → swarmauri_base-0.11.0.dev11}/swarmauri_base/live_models/events/SessionErrorEvent.py +0 -0
  128. {swarmauri_base-0.11.0.dev6 → swarmauri_base-0.11.0.dev11}/swarmauri_base/live_models/events/SessionLifecycleEvent.py +0 -0
  129. {swarmauri_base-0.11.0.dev6 → swarmauri_base-0.11.0.dev11}/swarmauri_base/live_models/events/SessionResumptionEvent.py +0 -0
  130. {swarmauri_base-0.11.0.dev6 → swarmauri_base-0.11.0.dev11}/swarmauri_base/live_models/events/TextDeltaEvent.py +0 -0
  131. {swarmauri_base-0.11.0.dev6 → swarmauri_base-0.11.0.dev11}/swarmauri_base/live_models/events/ToolCallEvent.py +0 -0
  132. {swarmauri_base-0.11.0.dev6 → swarmauri_base-0.11.0.dev11}/swarmauri_base/live_models/events/ToolCancellationEvent.py +0 -0
  133. {swarmauri_base-0.11.0.dev6 → swarmauri_base-0.11.0.dev11}/swarmauri_base/live_models/events/TurnCompleteEvent.py +0 -0
  134. {swarmauri_base-0.11.0.dev6 → swarmauri_base-0.11.0.dev11}/swarmauri_base/live_models/events/UsageEvent.py +0 -0
  135. {swarmauri_base-0.11.0.dev6 → swarmauri_base-0.11.0.dev11}/swarmauri_base/live_models/events/__init__.py +0 -0
  136. {swarmauri_base-0.11.0.dev6 → swarmauri_base-0.11.0.dev11}/swarmauri_base/live_models/inputs/AudioInput.py +0 -0
  137. {swarmauri_base-0.11.0.dev6 → swarmauri_base-0.11.0.dev11}/swarmauri_base/live_models/inputs/CommitTurnInput.py +0 -0
  138. {swarmauri_base-0.11.0.dev6 → swarmauri_base-0.11.0.dev11}/swarmauri_base/live_models/inputs/ImageInput.py +0 -0
  139. {swarmauri_base-0.11.0.dev6 → swarmauri_base-0.11.0.dev11}/swarmauri_base/live_models/inputs/InterruptInput.py +0 -0
  140. {swarmauri_base-0.11.0.dev6 → swarmauri_base-0.11.0.dev11}/swarmauri_base/live_models/inputs/TextInput.py +0 -0
  141. {swarmauri_base-0.11.0.dev6 → swarmauri_base-0.11.0.dev11}/swarmauri_base/live_models/inputs/ToolResultInput.py +0 -0
  142. {swarmauri_base-0.11.0.dev6 → swarmauri_base-0.11.0.dev11}/swarmauri_base/live_models/inputs/VideoInput.py +0 -0
  143. {swarmauri_base-0.11.0.dev6 → swarmauri_base-0.11.0.dev11}/swarmauri_base/live_models/inputs/__init__.py +0 -0
  144. {swarmauri_base-0.11.0.dev6 → swarmauri_base-0.11.0.dev11}/swarmauri_base/llms/LLMBase.py +0 -0
  145. {swarmauri_base-0.11.0.dev6 → swarmauri_base-0.11.0.dev11}/swarmauri_base/llms/__init__.py +0 -0
  146. {swarmauri_base-0.11.0.dev6 → swarmauri_base-0.11.0.dev11}/swarmauri_base/logger_formatters/FormatterBase.py +0 -0
  147. {swarmauri_base-0.11.0.dev6 → swarmauri_base-0.11.0.dev11}/swarmauri_base/logger_formatters/__init__.py +0 -0
  148. {swarmauri_base-0.11.0.dev6 → swarmauri_base-0.11.0.dev11}/swarmauri_base/logger_handlers/HandlerBase.py +0 -0
  149. {swarmauri_base-0.11.0.dev6 → swarmauri_base-0.11.0.dev11}/swarmauri_base/logger_handlers/__init__.py +0 -0
  150. {swarmauri_base-0.11.0.dev6 → swarmauri_base-0.11.0.dev11}/swarmauri_base/loggers/LoggerBase.py +0 -0
  151. {swarmauri_base-0.11.0.dev6 → swarmauri_base-0.11.0.dev11}/swarmauri_base/loggers/__init__.py +0 -0
  152. {swarmauri_base-0.11.0.dev6 → swarmauri_base-0.11.0.dev11}/swarmauri_base/matrices/MatrixBase.py +0 -0
  153. {swarmauri_base-0.11.0.dev6 → swarmauri_base-0.11.0.dev11}/swarmauri_base/matrices/__init__.py +0 -0
  154. {swarmauri_base-0.11.0.dev6 → swarmauri_base-0.11.0.dev11}/swarmauri_base/measurements/MeasurementAggregateMixin.py +0 -0
  155. {swarmauri_base-0.11.0.dev6 → swarmauri_base-0.11.0.dev11}/swarmauri_base/measurements/MeasurementBase.py +0 -0
  156. {swarmauri_base-0.11.0.dev6 → swarmauri_base-0.11.0.dev11}/swarmauri_base/measurements/MeasurementCalculateMixin.py +0 -0
  157. {swarmauri_base-0.11.0.dev6 → swarmauri_base-0.11.0.dev11}/swarmauri_base/measurements/MeasurementThresholdMixin.py +0 -0
  158. {swarmauri_base-0.11.0.dev6 → swarmauri_base-0.11.0.dev11}/swarmauri_base/measurements/__init__.py +0 -0
  159. {swarmauri_base-0.11.0.dev6 → swarmauri_base-0.11.0.dev11}/swarmauri_base/messages/MessageBase.py +0 -0
  160. {swarmauri_base-0.11.0.dev6 → swarmauri_base-0.11.0.dev11}/swarmauri_base/messages/__init__.py +0 -0
  161. {swarmauri_base-0.11.0.dev6 → swarmauri_base-0.11.0.dev11}/swarmauri_base/metrics/MetricBase.py +0 -0
  162. {swarmauri_base-0.11.0.dev6 → swarmauri_base-0.11.0.dev11}/swarmauri_base/metrics/__init__.py +0 -0
  163. {swarmauri_base-0.11.0.dev6 → swarmauri_base-0.11.0.dev11}/swarmauri_base/middlewares/__init__.py +0 -0
  164. {swarmauri_base-0.11.0.dev6 → swarmauri_base-0.11.0.dev11}/swarmauri_base/model_providers/ModelCatalogBase.py +0 -0
  165. {swarmauri_base-0.11.0.dev6 → swarmauri_base-0.11.0.dev11}/swarmauri_base/model_providers/ModelProviderBase.py +0 -0
  166. {swarmauri_base-0.11.0.dev6 → swarmauri_base-0.11.0.dev11}/swarmauri_base/model_providers/ProviderAuthBase.py +0 -0
  167. {swarmauri_base-0.11.0.dev6 → swarmauri_base-0.11.0.dev11}/swarmauri_base/model_providers/ProviderConnectionConfig.py +0 -0
  168. {swarmauri_base-0.11.0.dev6 → swarmauri_base-0.11.0.dev11}/swarmauri_base/model_providers/ProviderConnectionConfigBase.py +0 -0
  169. {swarmauri_base-0.11.0.dev6 → swarmauri_base-0.11.0.dev11}/swarmauri_base/model_providers/ProviderEndpointBase.py +0 -0
  170. {swarmauri_base-0.11.0.dev6 → swarmauri_base-0.11.0.dev11}/swarmauri_base/model_providers/ProviderErrorMapperBase.py +0 -0
  171. {swarmauri_base-0.11.0.dev6 → swarmauri_base-0.11.0.dev11}/swarmauri_base/model_providers/__init__.py +0 -0
  172. {swarmauri_base-0.11.0.dev6 → swarmauri_base-0.11.0.dev11}/swarmauri_base/models/ModelBase.py +0 -0
  173. {swarmauri_base-0.11.0.dev6 → swarmauri_base-0.11.0.dev11}/swarmauri_base/models/ModelCapabilitiesBase.py +0 -0
  174. {swarmauri_base-0.11.0.dev6 → swarmauri_base-0.11.0.dev11}/swarmauri_base/models/__init__.py +0 -0
  175. {swarmauri_base-0.11.0.dev6 → swarmauri_base-0.11.0.dev11}/swarmauri_base/mre_crypto/MreCryptoBase.py +0 -0
  176. {swarmauri_base-0.11.0.dev6 → swarmauri_base-0.11.0.dev11}/swarmauri_base/mre_crypto/__init__.py +0 -0
  177. {swarmauri_base-0.11.0.dev6 → swarmauri_base-0.11.0.dev11}/swarmauri_base/norms/NormBase.py +0 -0
  178. {swarmauri_base-0.11.0.dev6 → swarmauri_base-0.11.0.dev11}/swarmauri_base/norms/UseInnerProductMixin.py +0 -0
  179. {swarmauri_base-0.11.0.dev6 → swarmauri_base-0.11.0.dev11}/swarmauri_base/norms/__init__.py +0 -0
  180. {swarmauri_base-0.11.0.dev6 → swarmauri_base-0.11.0.dev11}/swarmauri_base/ocrs/OCRBase.py +0 -0
  181. {swarmauri_base-0.11.0.dev6 → swarmauri_base-0.11.0.dev11}/swarmauri_base/ocrs/__init__.py +0 -0
  182. {swarmauri_base-0.11.0.dev6 → swarmauri_base-0.11.0.dev11}/swarmauri_base/parsers/ParserBase.py +0 -0
  183. {swarmauri_base-0.11.0.dev6 → swarmauri_base-0.11.0.dev11}/swarmauri_base/parsers/__init__.py +0 -0
  184. {swarmauri_base-0.11.0.dev6 → swarmauri_base-0.11.0.dev11}/swarmauri_base/pipelines/PipelineBase.py +0 -0
  185. {swarmauri_base-0.11.0.dev6 → swarmauri_base-0.11.0.dev11}/swarmauri_base/pipelines/__init__.py +0 -0
  186. {swarmauri_base-0.11.0.dev6 → swarmauri_base-0.11.0.dev11}/swarmauri_base/pop/PopSignerMixin.py +0 -0
  187. {swarmauri_base-0.11.0.dev6 → swarmauri_base-0.11.0.dev11}/swarmauri_base/pop/PopSigningBase.py +0 -0
  188. {swarmauri_base-0.11.0.dev6 → swarmauri_base-0.11.0.dev11}/swarmauri_base/pop/PopVerifierMixin.py +0 -0
  189. {swarmauri_base-0.11.0.dev6 → swarmauri_base-0.11.0.dev11}/swarmauri_base/pop/__init__.py +0 -0
  190. {swarmauri_base-0.11.0.dev6 → swarmauri_base-0.11.0.dev11}/swarmauri_base/pop/binding.py +0 -0
  191. {swarmauri_base-0.11.0.dev6 → swarmauri_base-0.11.0.dev11}/swarmauri_base/pop/util.py +0 -0
  192. {swarmauri_base-0.11.0.dev6 → swarmauri_base-0.11.0.dev11}/swarmauri_base/processes/ContainerProcessBackendBase.py +0 -0
  193. {swarmauri_base-0.11.0.dev6 → swarmauri_base-0.11.0.dev11}/swarmauri_base/processes/__init__.py +0 -0
  194. {swarmauri_base-0.11.0.dev6 → swarmauri_base-0.11.0.dev11}/swarmauri_base/processes/_subprocess.py +0 -0
  195. {swarmauri_base-0.11.0.dev6 → swarmauri_base-0.11.0.dev11}/swarmauri_base/processes/collect_process.py +0 -0
  196. {swarmauri_base-0.11.0.dev6 → swarmauri_base-0.11.0.dev11}/swarmauri_base/programs/ProgramBase.py +0 -0
  197. {swarmauri_base-0.11.0.dev6 → swarmauri_base-0.11.0.dev11}/swarmauri_base/programs/__init__.py +0 -0
  198. {swarmauri_base-0.11.0.dev6 → swarmauri_base-0.11.0.dev11}/swarmauri_base/prompt_templates/PromptTemplateBase.py +0 -0
  199. {swarmauri_base-0.11.0.dev6 → swarmauri_base-0.11.0.dev11}/swarmauri_base/prompt_templates/__init__.py +0 -0
  200. {swarmauri_base-0.11.0.dev6 → swarmauri_base-0.11.0.dev11}/swarmauri_base/prompts/PromptBase.py +0 -0
  201. {swarmauri_base-0.11.0.dev6 → swarmauri_base-0.11.0.dev11}/swarmauri_base/prompts/PromptGeneratorBase.py +0 -0
  202. {swarmauri_base-0.11.0.dev6 → swarmauri_base-0.11.0.dev11}/swarmauri_base/prompts/PromptMatrixBase.py +0 -0
  203. {swarmauri_base-0.11.0.dev6 → swarmauri_base-0.11.0.dev11}/swarmauri_base/prompts/__init__.py +0 -0
  204. {swarmauri_base-0.11.0.dev6 → swarmauri_base-0.11.0.dev11}/swarmauri_base/pseudometrics/PseudometricBase.py +0 -0
  205. {swarmauri_base-0.11.0.dev6 → swarmauri_base-0.11.0.dev11}/swarmauri_base/pseudometrics/__init__.py +0 -0
  206. {swarmauri_base-0.11.0.dev6 → swarmauri_base-0.11.0.dev11}/swarmauri_base/publishers/PublishBase.py +0 -0
  207. {swarmauri_base-0.11.0.dev6 → swarmauri_base-0.11.0.dev11}/swarmauri_base/publishers/__init__.py +0 -0
  208. {swarmauri_base-0.11.0.dev6 → swarmauri_base-0.11.0.dev11}/swarmauri_base/rate_limits/RateLimitBase.py +0 -0
  209. {swarmauri_base-0.11.0.dev6 → swarmauri_base-0.11.0.dev11}/swarmauri_base/rate_limits/__init__.py +0 -0
  210. {swarmauri_base-0.11.0.dev6 → swarmauri_base-0.11.0.dev11}/swarmauri_base/retrievers/RetrieverBase.py +0 -0
  211. {swarmauri_base-0.11.0.dev6 → swarmauri_base-0.11.0.dev11}/swarmauri_base/retrievers/RetrieverMixin.py +0 -0
  212. {swarmauri_base-0.11.0.dev6 → swarmauri_base-0.11.0.dev11}/swarmauri_base/retrievers/__init__.py +0 -0
  213. {swarmauri_base-0.11.0.dev6 → swarmauri_base-0.11.0.dev11}/swarmauri_base/schema_converters/SchemaConverterBase.py +0 -0
  214. {swarmauri_base-0.11.0.dev6 → swarmauri_base-0.11.0.dev11}/swarmauri_base/schema_converters/__init__.py +0 -0
  215. {swarmauri_base-0.11.0.dev6 → swarmauri_base-0.11.0.dev11}/swarmauri_base/secrets/__init__.py +0 -0
  216. {swarmauri_base-0.11.0.dev6 → swarmauri_base-0.11.0.dev11}/swarmauri_base/seminorms/SeminormBase.py +0 -0
  217. {swarmauri_base-0.11.0.dev6 → swarmauri_base-0.11.0.dev11}/swarmauri_base/seminorms/__init__.py +0 -0
  218. {swarmauri_base-0.11.0.dev6 → swarmauri_base-0.11.0.dev11}/swarmauri_base/service_registries/ServiceRegistryBase.py +0 -0
  219. {swarmauri_base-0.11.0.dev6 → swarmauri_base-0.11.0.dev11}/swarmauri_base/service_registries/__init__.py +0 -0
  220. {swarmauri_base-0.11.0.dev6 → swarmauri_base-0.11.0.dev11}/swarmauri_base/signing/SigningBase.py +0 -0
  221. {swarmauri_base-0.11.0.dev6 → swarmauri_base-0.11.0.dev11}/swarmauri_base/signing/__init__.py +0 -0
  222. {swarmauri_base-0.11.0.dev6 → swarmauri_base-0.11.0.dev11}/swarmauri_base/similarities/SimilarityBase.py +0 -0
  223. {swarmauri_base-0.11.0.dev6 → swarmauri_base-0.11.0.dev11}/swarmauri_base/similarities/__init__.py +0 -0
  224. {swarmauri_base-0.11.0.dev6 → swarmauri_base-0.11.0.dev11}/swarmauri_base/skills/FileSystemSkillMixin.py +0 -0
  225. {swarmauri_base-0.11.0.dev6 → swarmauri_base-0.11.0.dev11}/swarmauri_base/skills/LocalSkillMixin.py +0 -0
  226. {swarmauri_base-0.11.0.dev6 → swarmauri_base-0.11.0.dev11}/swarmauri_base/skills/SkillBase.py +0 -0
  227. {swarmauri_base-0.11.0.dev6 → swarmauri_base-0.11.0.dev11}/swarmauri_base/skills/SkillCatalog.py +0 -0
  228. {swarmauri_base-0.11.0.dev6 → swarmauri_base-0.11.0.dev11}/swarmauri_base/skills/SkillLoaderBase.py +0 -0
  229. {swarmauri_base-0.11.0.dev6 → swarmauri_base-0.11.0.dev11}/swarmauri_base/skills/SkillMetadata.py +0 -0
  230. {swarmauri_base-0.11.0.dev6 → swarmauri_base-0.11.0.dev11}/swarmauri_base/skills/__init__.py +0 -0
  231. {swarmauri_base-0.11.0.dev6 → swarmauri_base-0.11.0.dev11}/swarmauri_base/state/StateBase.py +0 -0
  232. {swarmauri_base-0.11.0.dev6 → swarmauri_base-0.11.0.dev11}/swarmauri_base/state/__init__.py +0 -0
  233. {swarmauri_base-0.11.0.dev6 → swarmauri_base-0.11.0.dev11}/swarmauri_base/storage/StorageAdapterBase.py +0 -0
  234. {swarmauri_base-0.11.0.dev6 → swarmauri_base-0.11.0.dev11}/swarmauri_base/storage/__init__.py +0 -0
  235. {swarmauri_base-0.11.0.dev6 → swarmauri_base-0.11.0.dev11}/swarmauri_base/stt/STTBase.py +0 -0
  236. {swarmauri_base-0.11.0.dev6 → swarmauri_base-0.11.0.dev11}/swarmauri_base/stt/__init__.py +0 -0
  237. {swarmauri_base-0.11.0.dev6 → swarmauri_base-0.11.0.dev11}/swarmauri_base/swarms/SwarmBase.py +0 -0
  238. {swarmauri_base-0.11.0.dev6 → swarmauri_base-0.11.0.dev11}/swarmauri_base/swarms/__init__.py +0 -0
  239. {swarmauri_base-0.11.0.dev6 → swarmauri_base-0.11.0.dev11}/swarmauri_base/task_mgmt_strategies/TaskMgmtStrategyBase.py +0 -0
  240. {swarmauri_base-0.11.0.dev6 → swarmauri_base-0.11.0.dev11}/swarmauri_base/task_mgmt_strategies/__init__.py +0 -0
  241. {swarmauri_base-0.11.0.dev6 → swarmauri_base-0.11.0.dev11}/swarmauri_base/tensors/TensorBase.py +0 -0
  242. {swarmauri_base-0.11.0.dev6 → swarmauri_base-0.11.0.dev11}/swarmauri_base/tensors/__init__.py +0 -0
  243. {swarmauri_base-0.11.0.dev6 → swarmauri_base-0.11.0.dev11}/swarmauri_base/tokens/TokenServiceBase.py +0 -0
  244. {swarmauri_base-0.11.0.dev6 → swarmauri_base-0.11.0.dev11}/swarmauri_base/tokens/__init__.py +0 -0
  245. {swarmauri_base-0.11.0.dev6 → swarmauri_base-0.11.0.dev11}/swarmauri_base/tool_llms/ToolLLMBase.py +0 -0
  246. {swarmauri_base-0.11.0.dev6 → swarmauri_base-0.11.0.dev11}/swarmauri_base/tool_llms/__init__.py +0 -0
  247. {swarmauri_base-0.11.0.dev6 → swarmauri_base-0.11.0.dev11}/swarmauri_base/toolkits/ToolkitBase.py +0 -0
  248. {swarmauri_base-0.11.0.dev6 → swarmauri_base-0.11.0.dev11}/swarmauri_base/toolkits/__init__.py +0 -0
  249. {swarmauri_base-0.11.0.dev6 → swarmauri_base-0.11.0.dev11}/swarmauri_base/tools/ParameterBase.py +0 -0
  250. {swarmauri_base-0.11.0.dev6 → swarmauri_base-0.11.0.dev11}/swarmauri_base/tools/ToolBase.py +0 -0
  251. {swarmauri_base-0.11.0.dev6 → swarmauri_base-0.11.0.dev11}/swarmauri_base/tools/ToolExecutionError.py +0 -0
  252. {swarmauri_base-0.11.0.dev6 → swarmauri_base-0.11.0.dev11}/swarmauri_base/tools/ToolExecutionPolicy.py +0 -0
  253. {swarmauri_base-0.11.0.dev6 → swarmauri_base-0.11.0.dev11}/swarmauri_base/tools/ToolExecutionRequest.py +0 -0
  254. {swarmauri_base-0.11.0.dev6 → swarmauri_base-0.11.0.dev11}/swarmauri_base/tools/ToolExecutionResult.py +0 -0
  255. {swarmauri_base-0.11.0.dev6 → swarmauri_base-0.11.0.dev11}/swarmauri_base/tools/ToolExecutorBase.py +0 -0
  256. {swarmauri_base-0.11.0.dev6 → swarmauri_base-0.11.0.dev11}/swarmauri_base/tools/__init__.py +0 -0
  257. {swarmauri_base-0.11.0.dev6 → swarmauri_base-0.11.0.dev11}/swarmauri_base/transports/TransportBase.py +0 -0
  258. {swarmauri_base-0.11.0.dev6 → swarmauri_base-0.11.0.dev11}/swarmauri_base/transports/__init__.py +0 -0
  259. {swarmauri_base-0.11.0.dev6 → swarmauri_base-0.11.0.dev11}/swarmauri_base/transports/appserver_mixin.py +0 -0
  260. {swarmauri_base-0.11.0.dev6 → swarmauri_base-0.11.0.dev11}/swarmauri_base/transports/bidirectional/BidirectionalStreamClientBase.py +0 -0
  261. {swarmauri_base-0.11.0.dev6 → swarmauri_base-0.11.0.dev11}/swarmauri_base/transports/bidirectional/BidirectionalStreamConnectionBase.py +0 -0
  262. {swarmauri_base-0.11.0.dev6 → swarmauri_base-0.11.0.dev11}/swarmauri_base/transports/bidirectional/BidirectionalStreamState.py +0 -0
  263. {swarmauri_base-0.11.0.dev6 → swarmauri_base-0.11.0.dev11}/swarmauri_base/transports/bidirectional/__init__.py +0 -0
  264. {swarmauri_base-0.11.0.dev6 → swarmauri_base-0.11.0.dev11}/swarmauri_base/transports/http/AsyncHttpStreamResponseBase.py +0 -0
  265. {swarmauri_base-0.11.0.dev6 → swarmauri_base-0.11.0.dev11}/swarmauri_base/transports/http/HttpClientBase.py +0 -0
  266. {swarmauri_base-0.11.0.dev6 → swarmauri_base-0.11.0.dev11}/swarmauri_base/transports/http/HttpResponseBase.py +0 -0
  267. {swarmauri_base-0.11.0.dev6 → swarmauri_base-0.11.0.dev11}/swarmauri_base/transports/http/HttpStreamResponseBase.py +0 -0
  268. {swarmauri_base-0.11.0.dev6 → swarmauri_base-0.11.0.dev11}/swarmauri_base/transports/http/__init__.py +0 -0
  269. {swarmauri_base-0.11.0.dev6 → swarmauri_base-0.11.0.dev11}/swarmauri_base/transports/http_client_mixin.py +0 -0
  270. {swarmauri_base-0.11.0.dev6 → swarmauri_base-0.11.0.dev11}/swarmauri_base/transports/http_server_mixin.py +0 -0
  271. {swarmauri_base-0.11.0.dev6 → swarmauri_base-0.11.0.dev11}/swarmauri_base/transports/mixins.py +0 -0
  272. {swarmauri_base-0.11.0.dev6 → swarmauri_base-0.11.0.dev11}/swarmauri_base/transports/multiplex_mixin.py +0 -0
  273. {swarmauri_base-0.11.0.dev6 → swarmauri_base-0.11.0.dev11}/swarmauri_base/transports/peer_mixin.py +0 -0
  274. {swarmauri_base-0.11.0.dev6 → swarmauri_base-0.11.0.dev11}/swarmauri_base/transports/runnable_mixin.py +0 -0
  275. {swarmauri_base-0.11.0.dev6 → swarmauri_base-0.11.0.dev11}/swarmauri_base/transports/websocket/WebSocketClientBase.py +0 -0
  276. {swarmauri_base-0.11.0.dev6 → swarmauri_base-0.11.0.dev11}/swarmauri_base/transports/websocket/WebSocketConnectionBase.py +0 -0
  277. {swarmauri_base-0.11.0.dev6 → swarmauri_base-0.11.0.dev11}/swarmauri_base/transports/websocket/WebSocketMultiplexConnectionBase.py +0 -0
  278. {swarmauri_base-0.11.0.dev6 → swarmauri_base-0.11.0.dev11}/swarmauri_base/transports/websocket/WebSocketState.py +0 -0
  279. {swarmauri_base-0.11.0.dev6 → swarmauri_base-0.11.0.dev11}/swarmauri_base/transports/websocket/__init__.py +0 -0
  280. {swarmauri_base-0.11.0.dev6 → swarmauri_base-0.11.0.dev11}/swarmauri_base/tts/TTSBase.py +0 -0
  281. {swarmauri_base-0.11.0.dev6 → swarmauri_base-0.11.0.dev11}/swarmauri_base/utils/__init__.py +0 -0
  282. {swarmauri_base-0.11.0.dev6 → swarmauri_base-0.11.0.dev11}/swarmauri_base/utils/allowed_models.py +0 -0
  283. {swarmauri_base-0.11.0.dev6 → swarmauri_base-0.11.0.dev11}/swarmauri_base/vector_stores/VectorStoreBase.py +0 -0
  284. {swarmauri_base-0.11.0.dev6 → swarmauri_base-0.11.0.dev11}/swarmauri_base/vector_stores/VectorStoreCloudMixin.py +0 -0
  285. {swarmauri_base-0.11.0.dev6 → swarmauri_base-0.11.0.dev11}/swarmauri_base/vector_stores/VectorStoreComparator.py +0 -0
  286. {swarmauri_base-0.11.0.dev6 → swarmauri_base-0.11.0.dev11}/swarmauri_base/vector_stores/VectorStorePersistentMixin.py +0 -0
  287. {swarmauri_base-0.11.0.dev6 → swarmauri_base-0.11.0.dev11}/swarmauri_base/vector_stores/VectorStoreRetrieveMixin.py +0 -0
  288. {swarmauri_base-0.11.0.dev6 → swarmauri_base-0.11.0.dev11}/swarmauri_base/vector_stores/VectorStoreSaveLoadMixin.py +0 -0
  289. {swarmauri_base-0.11.0.dev6 → swarmauri_base-0.11.0.dev11}/swarmauri_base/vector_stores/VisionVectorStoreBase.py +0 -0
  290. {swarmauri_base-0.11.0.dev6 → swarmauri_base-0.11.0.dev11}/swarmauri_base/vector_stores/__init__.py +0 -0
  291. {swarmauri_base-0.11.0.dev6 → swarmauri_base-0.11.0.dev11}/swarmauri_base/vectors/VectorBase.py +0 -0
  292. {swarmauri_base-0.11.0.dev6 → swarmauri_base-0.11.0.dev11}/swarmauri_base/vectors/__init__.py +0 -0
  293. {swarmauri_base-0.11.0.dev6 → swarmauri_base-0.11.0.dev11}/swarmauri_base/video_lipsync/LipSyncBase.py +0 -0
  294. {swarmauri_base-0.11.0.dev6 → swarmauri_base-0.11.0.dev11}/swarmauri_base/video_lipsync/__init__.py +0 -0
  295. {swarmauri_base-0.11.0.dev6 → swarmauri_base-0.11.0.dev11}/swarmauri_base/vlms/VLMBase.py +0 -0
  296. {swarmauri_base-0.11.0.dev6 → swarmauri_base-0.11.0.dev11}/swarmauri_base/vlms/__init__.py +0 -0
  297. {swarmauri_base-0.11.0.dev6 → swarmauri_base-0.11.0.dev11}/swarmauri_base/xmp/EmbedXmpBase.py +0 -0
  298. {swarmauri_base-0.11.0.dev6 → swarmauri_base-0.11.0.dev11}/swarmauri_base/xmp/__init__.py +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: swarmauri_base
3
- Version: 0.11.0.dev6
3
+ Version: 0.11.0.dev11
4
4
  Summary: Reusable Swarmauri base classes, mixins, and dynamic Pydantic component models for composable intelligence infrastructure.
5
5
  License-Expression: Apache-2.0
6
6
  License-File: LICENSE
@@ -24,10 +24,12 @@ Classifier: Topic :: Scientific/Engineering :: Artificial Intelligence
24
24
  Classifier: Topic :: Software Development :: Libraries
25
25
  Classifier: Topic :: Software Development :: Libraries :: Python Modules
26
26
  Classifier: Topic :: Text Processing :: Markup
27
+ Requires-Dist: httpx (>=0.27)
27
28
  Requires-Dist: numpy (>=1.26.4)
28
29
  Requires-Dist: pydantic (>=2.0)
29
30
  Requires-Dist: pyyaml (>=6.0.2)
30
- Requires-Dist: swarmauri_core (>=0.11.0.dev6,<0.12)
31
+ Requires-Dist: starlette
32
+ Requires-Dist: swarmauri_core (>=0.11.0.dev7,<0.12)
31
33
  Requires-Dist: swarmauri_typing
32
34
  Requires-Dist: toml (>=0.10.2)
33
35
  Requires-Dist: tomli (>=2.0) ; python_version < "3.11"
@@ -215,5 +217,25 @@ Apache-2.0
215
217
 
216
218
  When adding or changing a base class, keep it aligned with the corresponding `swarmauri_core` interface, preserve direct plugin instantiation patterns, update exports and tests, and follow the [Swarmauri SDK contribution guide](https://github.com/swarmauri/swarmauri-sdk/blob/master/CONTRIBUTING.md).
217
219
 
220
+ ## Run storage
218
221
 
222
+ `swarmauri_base.run_stores.RunStoreBase` implements shared checkpoint revision
223
+ rules. A backend supplies an insert, a read, and an atomic compare-and-swap.
224
+
225
+ ## HTTP TTS transport
226
+
227
+ `tts.HttpTTSMixin` shares file, streaming and bounded async batch transport for
228
+ standalone TTS providers. Provider packages own request schemas, fixed URLs and
229
+ stream decoding. `_speech_endpoint(streaming)` selects provider-owned unary
230
+ and streaming routes; `_audio_content(response)` decodes unary JSON audio when
231
+ needed. `_speech_request(payload, streaming)` prepares headers and body once for
232
+ providers that require XML or an exact body signature. Existing JSON/binary
233
+ providers retain their default behavior. Transport does
234
+ not replay potentially billable requests.
235
+
236
+ `tts.JsonAudioTTSMixin` decodes complete base64/data-URI audio from JSON for
237
+ file and batch workflows. It rejects URL audio and malformed/empty data, and
238
+ checks WAV headers when WAV is requested. Providers validate their own status
239
+ and format fields. Its stream/astream methods raise locally; a complete JSON
240
+ response is never labeled an incremental stream.
219
241
 
@@ -180,4 +180,24 @@ Apache-2.0
180
180
 
181
181
  When adding or changing a base class, keep it aligned with the corresponding `swarmauri_core` interface, preserve direct plugin instantiation patterns, update exports and tests, and follow the [Swarmauri SDK contribution guide](https://github.com/swarmauri/swarmauri-sdk/blob/master/CONTRIBUTING.md).
182
182
 
183
-
183
+ ## Run storage
184
+
185
+ `swarmauri_base.run_stores.RunStoreBase` implements shared checkpoint revision
186
+ rules. A backend supplies an insert, a read, and an atomic compare-and-swap.
187
+
188
+ ## HTTP TTS transport
189
+
190
+ `tts.HttpTTSMixin` shares file, streaming and bounded async batch transport for
191
+ standalone TTS providers. Provider packages own request schemas, fixed URLs and
192
+ stream decoding. `_speech_endpoint(streaming)` selects provider-owned unary
193
+ and streaming routes; `_audio_content(response)` decodes unary JSON audio when
194
+ needed. `_speech_request(payload, streaming)` prepares headers and body once for
195
+ providers that require XML or an exact body signature. Existing JSON/binary
196
+ providers retain their default behavior. Transport does
197
+ not replay potentially billable requests.
198
+
199
+ `tts.JsonAudioTTSMixin` decodes complete base64/data-URI audio from JSON for
200
+ file and batch workflows. It rejects URL audio and malformed/empty data, and
201
+ checks WAV headers when WAV is requested. Providers validate their own status
202
+ and format fields. Its stream/astream methods raise locally; a complete JSON
203
+ response is never labeled an incremental stream.
@@ -1,6 +1,6 @@
1
1
  [project]
2
2
  name = "swarmauri_base"
3
- version = "0.11.0.dev6"
3
+ version = "0.11.0.dev11"
4
4
  description = "Reusable Swarmauri base classes, mixins, and dynamic Pydantic component models for composable intelligence infrastructure."
5
5
  keywords = [
6
6
  "swarmauri",
@@ -46,9 +46,11 @@ classifiers = [
46
46
  requires-python = ">=3.10,<3.15"
47
47
  dependencies = [
48
48
  "pyyaml>=6.0.2",
49
+ "httpx>=0.27",
49
50
  "numpy>=1.26.4",
50
51
  "pydantic>=2.0",
51
- "swarmauri_core>=0.11.0.dev6,<0.12",
52
+ "starlette",
53
+ "swarmauri_core>=0.11.0.dev7,<0.12",
52
54
  "swarmauri_typing",
53
55
  "toml>=0.10.2",
54
56
  "tomli>=2.0; python_version < '3.11'"
@@ -62,7 +64,6 @@ swarmauri_tests_pylicense = { workspace = true }
62
64
  [dependency-groups]
63
65
  dev = [
64
66
  "toml>=0.10.2",
65
- "fastapi>=0.110.0",
66
67
  "httpx>=0.27.0",
67
68
  "pytest>=8.0.0",
68
69
  "pytest-xdist>=3.6.1",
@@ -57,6 +57,7 @@ class ResourceTypes(Enum):
57
57
 
58
58
  UNIVERSAL_BASE = "ComponentBase"
59
59
  AGENT = "Agent"
60
+ RUN_STORE = "RunStore"
60
61
  AGENT_FACTORY = "AgentFactory"
61
62
  MODEL = "Model"
62
63
  MODEL_PROVIDER = "ModelProvider"
@@ -0,0 +1,89 @@
1
+ from abc import abstractmethod
2
+
3
+ from swarmauri_core.agents.IAgentCompaction import (
4
+ CountInputTokens,
5
+ IAgentCompaction,
6
+ )
7
+ from swarmauri_core.conversations.ICompactingConversation import (
8
+ CompactionPlan,
9
+ ICompactingConversation,
10
+ )
11
+
12
+ from swarmauri_base.agents.AgentConversationMixin import AgentConversationMixin
13
+
14
+
15
+ class AgentCompactionMixin(IAgentCompaction, AgentConversationMixin):
16
+ """Orchestrate compaction with summarization supplied by the agent."""
17
+
18
+ @abstractmethod
19
+ def _summarize_compaction(self, plan: CompactionPlan) -> str:
20
+ """Summarize the previous summary and eligible older messages."""
21
+
22
+ @abstractmethod
23
+ async def _asummarize_compaction(self, plan: CompactionPlan) -> str:
24
+ """Asynchronously summarize the earlier conversation."""
25
+
26
+ def compact(self, *, count_input_tokens: CountInputTokens) -> bool:
27
+ conversation = self.conversation
28
+ if not isinstance(conversation, ICompactingConversation):
29
+ return False
30
+ plan = conversation.plan_compaction()
31
+ if plan is None:
32
+ return False
33
+ original_tokens = count_input_tokens(conversation.history)
34
+ summary = self._summarize_compaction(plan)
35
+ return self._apply_summary(
36
+ conversation, plan, summary, original_tokens, count_input_tokens
37
+ )
38
+
39
+ async def acompact(self, *, count_input_tokens: CountInputTokens) -> bool:
40
+ conversation = self.conversation
41
+ if not isinstance(conversation, ICompactingConversation):
42
+ return False
43
+ plan = conversation.plan_compaction()
44
+ if plan is None:
45
+ return False
46
+ original_tokens = count_input_tokens(conversation.history)
47
+ summary = await self._asummarize_compaction(plan)
48
+ return self._apply_summary(
49
+ conversation, plan, summary, original_tokens, count_input_tokens
50
+ )
51
+
52
+ def compact_if_needed(
53
+ self, *, count_input_tokens: CountInputTokens
54
+ ) -> bool:
55
+ return self._compaction_needed(count_input_tokens) and self.compact(
56
+ count_input_tokens=count_input_tokens
57
+ )
58
+
59
+ async def acompact_if_needed(
60
+ self, *, count_input_tokens: CountInputTokens
61
+ ) -> bool:
62
+ return self._compaction_needed(
63
+ count_input_tokens
64
+ ) and await self.acompact(count_input_tokens=count_input_tokens)
65
+
66
+ def _compaction_needed(self, count_input_tokens: CountInputTokens) -> bool:
67
+ conversation = self.conversation
68
+ if not isinstance(conversation, ICompactingConversation):
69
+ return False
70
+ trigger = conversation.compaction_trigger_tokens
71
+ return (
72
+ trigger is not None
73
+ and count_input_tokens(conversation.history) >= trigger
74
+ )
75
+
76
+ def _apply_summary(
77
+ self,
78
+ conversation: ICompactingConversation,
79
+ plan: CompactionPlan,
80
+ summary: str,
81
+ original_tokens: int,
82
+ count_input_tokens: CountInputTokens,
83
+ ) -> bool:
84
+ if self.conversation is not conversation or not summary.strip():
85
+ return False
86
+ proposed = conversation.preview_compaction(plan, summary)
87
+ if count_input_tokens(proposed) >= original_tokens:
88
+ return False
89
+ return conversation.apply_compaction(plan, summary)
@@ -0,0 +1,126 @@
1
+ from abc import abstractmethod
2
+ from collections.abc import Mapping, Sequence
3
+ from copy import deepcopy
4
+
5
+ from pydantic import Field
6
+ from swarmauri_core.conversations.ICompactingConversation import (
7
+ CompactionPlan,
8
+ ICompactingConversation,
9
+ )
10
+ from swarmauri_core.messages.IMessage import IMessage
11
+
12
+ from swarmauri_base.conversations.ConversationBase import ConversationBase
13
+ from swarmauri_base.messages.MessageBase import MessageBase
14
+
15
+
16
+ class ConversationCompactionMixin(ICompactingConversation, ConversationBase):
17
+ """Plan and apply compaction independently of any model."""
18
+
19
+ summary: str | None = None
20
+ trigger_tokens: int | None = Field(default=None, gt=0)
21
+ keep_recent_turns: int = Field(default=4, ge=1)
22
+
23
+ @property
24
+ def compaction_trigger_tokens(self) -> int | None:
25
+ return self.trigger_tokens
26
+
27
+ @abstractmethod
28
+ def _summary_message(self, summary: str) -> MessageBase:
29
+ """Render summary text as historical context."""
30
+
31
+ @staticmethod
32
+ def _instruction_end(messages: Sequence[MessageBase]) -> int:
33
+ for index, message in enumerate(messages):
34
+ if message.role not in {"system", "developer"}:
35
+ return index
36
+ return len(messages)
37
+
38
+ @property
39
+ def history(self) -> list[MessageBase]:
40
+ if not self.summary:
41
+ return list(self.messages)
42
+ start = self._instruction_end(self.messages)
43
+ return [
44
+ *self.messages[:start],
45
+ self._summary_message(self.summary),
46
+ *self.messages[start:],
47
+ ]
48
+
49
+ @staticmethod
50
+ def _is_complete_turn(messages: Sequence[MessageBase]) -> bool:
51
+ """Require a final reply and a result for every tool call."""
52
+ pending: set[str] = set()
53
+ answered = False
54
+ for message in messages[1:]:
55
+ if message.role == "assistant" and not pending:
56
+ for call in getattr(message, "tool_calls", None) or ():
57
+ call_id = (
58
+ call.get("id")
59
+ if isinstance(call, Mapping)
60
+ else getattr(call, "id", None)
61
+ )
62
+ if (
63
+ not isinstance(call_id, str)
64
+ or not call_id
65
+ or call_id in pending
66
+ ):
67
+ return False
68
+ pending.add(call_id)
69
+ answered = not pending
70
+ elif message.role == "tool":
71
+ call_id = getattr(message, "tool_call_id", None)
72
+ if call_id not in pending:
73
+ return False
74
+ pending.remove(call_id)
75
+ else:
76
+ return False
77
+ return answered and not pending
78
+
79
+ def plan_compaction(self) -> CompactionPlan | None:
80
+ start = self._instruction_end(self.messages)
81
+ turns = [
82
+ index
83
+ for index in range(start, len(self.messages))
84
+ if self.messages[index].role == "user"
85
+ ]
86
+ if not turns or turns[0] != start:
87
+ return None
88
+
89
+ stop = start
90
+ for begin, end in zip(turns[: -self.keep_recent_turns], turns[1:]):
91
+ if not self._is_complete_turn(self.messages[begin:end]):
92
+ break
93
+ stop = end
94
+ if stop == start:
95
+ return None
96
+
97
+ return CompactionPlan(
98
+ messages=tuple(deepcopy(self.messages)),
99
+ previous_summary=self.summary,
100
+ start=start,
101
+ stop=stop,
102
+ )
103
+
104
+ def preview_compaction(
105
+ self, plan: CompactionPlan, summary: str
106
+ ) -> list[IMessage]:
107
+ return [
108
+ *plan.messages[: plan.start],
109
+ self._summary_message(summary.strip()),
110
+ *plan.messages[plan.stop :],
111
+ ]
112
+
113
+ def apply_compaction(self, plan: CompactionPlan, summary: str) -> bool:
114
+ summary = summary.strip()
115
+ if not summary or self.plan_compaction() != plan:
116
+ return False
117
+
118
+ self.messages = (
119
+ self.messages[: plan.start] + self.messages[plan.stop :]
120
+ )
121
+ self.summary = summary
122
+ return True
123
+
124
+ def clear_history(self) -> None:
125
+ super().clear_history()
126
+ self.summary = None
@@ -0,0 +1,27 @@
1
+ """Read optional project configuration without depending on a plugin host."""
2
+
3
+ from __future__ import annotations
4
+
5
+ import os
6
+ from pathlib import Path
7
+
8
+ try:
9
+ import tomllib
10
+ except ImportError:
11
+ import tomli as tomllib
12
+
13
+
14
+ def load_filter_config() -> dict:
15
+ """Read PEAGEN_CONFIG or the nearest peagen.toml if present."""
16
+ configured = os.environ.get("PEAGEN_CONFIG")
17
+ if configured:
18
+ path = Path(configured).expanduser()
19
+ with path.open("rb") as stream:
20
+ return tomllib.load(stream)
21
+ current = Path.cwd()
22
+ for directory in (current, *current.parents):
23
+ path = directory / "peagen.toml"
24
+ if path.is_file():
25
+ with path.open("rb") as stream:
26
+ return tomllib.load(stream)
27
+ return {}
@@ -1,10 +1,10 @@
1
1
  from __future__ import annotations
2
2
 
3
3
  from collections.abc import Awaitable, Callable
4
- from typing import TYPE_CHECKING, Any
4
+ from typing import Any
5
5
 
6
- if TYPE_CHECKING: # pragma: no cover - imported for typing only
7
- from fastapi import Request, Response
6
+ from starlette.requests import Request
7
+ from starlette.responses import Response
8
8
 
9
9
  from swarmauri_core.middlewares.IMiddleware import (
10
10
  ASGIApp,
@@ -83,13 +83,6 @@ class MiddlewareBase(IMiddleware, ComponentBase):
83
83
  async def _dispatch_with_request(
84
84
  self, scope: Scope, receive: ReceiveCallable, send: SendCallable
85
85
  ) -> None:
86
- try:
87
- from fastapi import Request, Response
88
- except ImportError as exc: # pragma: no cover - optional dependency
89
- raise RuntimeError(
90
- "FastAPI must be installed to use dispatch-style middleware."
91
- ) from exc
92
-
93
86
  request = Request(scope, receive=receive)
94
87
 
95
88
  async def call_next(request: Request) -> Response:
@@ -0,0 +1,51 @@
1
+ from abc import abstractmethod
2
+ from dataclasses import replace
3
+ from typing import Literal
4
+
5
+ from swarmauri_core.run_stores import (
6
+ IRunStore,
7
+ RunCheckpoint,
8
+ RunConflictError,
9
+ )
10
+
11
+ from swarmauri_base.ComponentBase import ComponentBase, ResourceTypes
12
+
13
+
14
+ @ComponentBase.register_model()
15
+ class RunStoreBase(IRunStore, ComponentBase):
16
+ """Apply shared revision rules over atomic backend operations."""
17
+
18
+ resource: Literal["RunStore"] = ResourceTypes.RUN_STORE.value
19
+ type: Literal["RunStoreBase"] = "RunStoreBase"
20
+
21
+ def create(self, checkpoint: RunCheckpoint) -> None:
22
+ if checkpoint.revision != 0:
23
+ raise ValueError("A new run must start at revision zero")
24
+ if not self._insert(checkpoint):
25
+ raise RunConflictError(checkpoint.run_id)
26
+
27
+ def load(self, run_id: str) -> RunCheckpoint:
28
+ checkpoint = self._read(run_id)
29
+ if checkpoint is None:
30
+ raise KeyError(run_id)
31
+ return checkpoint
32
+
33
+ def save(self, checkpoint: RunCheckpoint) -> RunCheckpoint:
34
+ updated = replace(checkpoint, revision=checkpoint.revision + 1)
35
+ if not self._compare_and_swap(checkpoint.revision, updated):
36
+ raise RunConflictError(checkpoint.run_id)
37
+ return updated
38
+
39
+ @abstractmethod
40
+ def _insert(self, checkpoint: RunCheckpoint) -> bool:
41
+ pass
42
+
43
+ @abstractmethod
44
+ def _read(self, run_id: str) -> RunCheckpoint | None:
45
+ pass
46
+
47
+ @abstractmethod
48
+ def _compare_and_swap(
49
+ self, expected: int, checkpoint: RunCheckpoint
50
+ ) -> bool:
51
+ pass
@@ -0,0 +1,3 @@
1
+ from .RunStoreBase import RunStoreBase
2
+
3
+ __all__ = ["RunStoreBase"]
@@ -0,0 +1,165 @@
1
+ """Share binary HTTP transport without coupling TTS provider packages."""
2
+
3
+ import asyncio
4
+ from collections.abc import AsyncIterator, Iterator, Mapping
5
+ from pathlib import Path
6
+ from typing import Any, ClassVar
7
+
8
+ import httpx
9
+
10
+
11
+ class HttpTTSMixin:
12
+ """Implement file, streaming and bounded batch execution for speech APIs.
13
+
14
+ Providers supply their fixed URL and payload. Requests are not retried
15
+ automatically: replaying a speech request can generate duplicate charges.
16
+ """
17
+
18
+ _speech_url: ClassVar[str]
19
+ _sse_stream: ClassVar[bool] = False
20
+
21
+ def _speech_payload(self, text: str, streaming: bool) -> dict[str, Any]:
22
+ raise NotImplementedError
23
+
24
+ def _speech_endpoint(self, streaming: bool) -> str:
25
+ "Select a provider-owned URL without accepting credential redirects."
26
+ return self._speech_url
27
+
28
+ def _speech_request(
29
+ self, payload: dict[str, Any], streaming: bool
30
+ ) -> dict[str, Any]:
31
+ """Prepare the exact headers/body once, allowing XML and signing."""
32
+ return {"headers": self._speech_headers(), "json": payload}
33
+
34
+ def _audio_content(self, response: httpx.Response) -> bytes:
35
+ """Extract unary audio; JSON providers override this decoding hook."""
36
+ return response.content
37
+
38
+ def _speech_headers(self) -> dict[str, str]:
39
+ return {
40
+ "Authorization": f"Bearer {self.api_key.get_secret_value()}",
41
+ "Content-Type": "application/json",
42
+ }
43
+
44
+ def _payload(self, text: str, streaming: bool) -> dict[str, Any]:
45
+ if not isinstance(text, str) or not text.strip():
46
+ raise ValueError("Speech input must be non-empty text.")
47
+ return self._speech_payload(text, streaming)
48
+
49
+ def _check_response(
50
+ self, response: httpx.Response, streaming: bool = False
51
+ ) -> None:
52
+ response.raise_for_status()
53
+ media_type = (
54
+ response.headers.get("content-type", "")
55
+ .partition(";")[0]
56
+ .strip()
57
+ .lower()
58
+ )
59
+ if streaming and self._sse_stream:
60
+ if media_type != "text/event-stream":
61
+ raise ValueError("Expected an SSE audio response.")
62
+ elif "json" in media_type or media_type.startswith("text/"):
63
+ raise ValueError(
64
+ "Expected binary audio, received a text response."
65
+ )
66
+
67
+ def predict(self, text: str, audio_path: str = "output.mp3") -> str:
68
+ payload = self._payload(text, streaming=False)
69
+ with httpx.Client(timeout=self.timeout) as client:
70
+ response = client.post(
71
+ self._speech_endpoint(False),
72
+ **self._speech_request(payload, False),
73
+ )
74
+ self._check_response(response)
75
+ content = self._audio_content(response)
76
+ if not content:
77
+ raise ValueError("Speech API returned empty audio.")
78
+ path = Path(audio_path).expanduser().resolve()
79
+ path.write_bytes(content)
80
+ return str(path)
81
+
82
+ async def apredict(self, text: str, audio_path: str = "output.mp3") -> str:
83
+ payload = self._payload(text, streaming=False)
84
+ async with httpx.AsyncClient(timeout=self.timeout) as client:
85
+ response = await client.post(
86
+ self._speech_endpoint(False),
87
+ **self._speech_request(payload, False),
88
+ )
89
+ self._check_response(response)
90
+ content = self._audio_content(response)
91
+ if not content:
92
+ raise ValueError("Speech API returned empty audio.")
93
+ path = Path(audio_path).expanduser().resolve()
94
+ path.write_bytes(content)
95
+ return str(path)
96
+
97
+ def _audio_chunks(self, response: httpx.Response) -> Iterator[bytes]:
98
+ yield from response.iter_bytes()
99
+
100
+ async def _async_audio_chunks(
101
+ self, response: httpx.Response
102
+ ) -> AsyncIterator[bytes]:
103
+ async for chunk in response.aiter_bytes():
104
+ yield chunk
105
+
106
+ def stream(self, text: str) -> Iterator[bytes]:
107
+ payload = self._payload(text, streaming=True)
108
+ received = False
109
+ with httpx.Client(timeout=self.timeout) as client:
110
+ with client.stream(
111
+ "POST",
112
+ self._speech_endpoint(True),
113
+ **self._speech_request(payload, True),
114
+ ) as response:
115
+ self._check_response(response, streaming=True)
116
+ for chunk in self._audio_chunks(response):
117
+ if chunk:
118
+ received = True
119
+ yield chunk
120
+ if not received:
121
+ raise ValueError("Speech API returned empty audio.")
122
+
123
+ async def astream(self, text: str) -> AsyncIterator[bytes]:
124
+ payload = self._payload(text, streaming=True)
125
+ received = False
126
+ async with httpx.AsyncClient(timeout=self.timeout) as client:
127
+ async with client.stream(
128
+ "POST",
129
+ self._speech_endpoint(True),
130
+ **self._speech_request(payload, True),
131
+ ) as response:
132
+ self._check_response(response, streaming=True)
133
+ async for chunk in self._async_audio_chunks(response):
134
+ if chunk:
135
+ received = True
136
+ yield chunk
137
+ if not received:
138
+ raise ValueError("Speech API returned empty audio.")
139
+
140
+ def batch(self, text_path_dict: Mapping[str, str]) -> list[str]:
141
+ return [
142
+ self.predict(text, path) for text, path in text_path_dict.items()
143
+ ]
144
+
145
+ async def abatch(
146
+ self, text_path_dict: Mapping[str, str], max_concurrent: int = 5
147
+ ) -> list[str]:
148
+ if (
149
+ isinstance(max_concurrent, bool)
150
+ or not isinstance(max_concurrent, int)
151
+ or max_concurrent < 1
152
+ ):
153
+ raise ValueError("max_concurrent must be a positive integer.")
154
+ semaphore = asyncio.Semaphore(max_concurrent)
155
+
156
+ async def generate(text: str, path: str) -> str:
157
+ async with semaphore:
158
+ return await self.apredict(text, path)
159
+
160
+ return await asyncio.gather(
161
+ *(generate(text, path) for text, path in text_path_dict.items())
162
+ )
163
+
164
+ def get_allowed_models(self) -> list[str]:
165
+ return list(self.allowed_models)
@@ -0,0 +1,67 @@
1
+ "Transport complete base64 audio in JSON without claiming incremental audio."
2
+
3
+ import base64
4
+ import binascii
5
+ from collections.abc import AsyncIterator, Iterator
6
+ from typing import Any
7
+
8
+ import httpx
9
+
10
+ from .HttpTTSMixin import HttpTTSMixin
11
+
12
+
13
+ class JsonAudioTTSMixin(HttpTTSMixin):
14
+ """Decode an audio field; never fetch URLs returned by an audio service."""
15
+
16
+ def _check_response(
17
+ self, response: httpx.Response, streaming: bool = False
18
+ ) -> None:
19
+ response.raise_for_status()
20
+
21
+ def _audio_object(self, response: httpx.Response) -> dict[str, Any]:
22
+ data = response.json()
23
+ if not isinstance(data, dict):
24
+ raise ValueError("Expected a JSON audio object.")
25
+ if "error" in data:
26
+ raise RuntimeError("Speech API reported an error.")
27
+ return data
28
+
29
+ def _audio_content(self, response: httpx.Response) -> bytes:
30
+ data = self._audio_object(response)
31
+ audio = data.get("audio")
32
+ if not isinstance(audio, str) or not audio:
33
+ raise ValueError("Speech API returned no encoded audio.")
34
+ if audio.startswith("data:"):
35
+ header, separator, audio = audio.partition(",")
36
+ if (
37
+ not separator
38
+ or not header.startswith("data:audio/")
39
+ or not header.endswith(";base64")
40
+ ):
41
+ raise ValueError("Expected a base64 audio data URI.")
42
+ try:
43
+ content = base64.b64decode(audio, validate=True)
44
+ except (ValueError, binascii.Error) as exc:
45
+ raise ValueError("Invalid base64 audio.") from exc
46
+ if not content:
47
+ raise ValueError("Speech API returned empty audio.")
48
+ if getattr(self, "response_format", None) == "wav" and (
49
+ content[:4] != b"RIFF" or content[8:12] != b"WAVE"
50
+ ):
51
+ raise ValueError("Expected WAV audio.")
52
+ return content
53
+
54
+ def predict(self, text: str, audio_path: str = "output.wav") -> str:
55
+ return super().predict(text, audio_path)
56
+
57
+ async def apredict(self, text: str, audio_path: str = "output.wav") -> str:
58
+ return await super().apredict(text, audio_path)
59
+
60
+ def stream(self, text: str) -> Iterator[bytes]:
61
+ raise NotImplementedError(
62
+ "This JSON audio adapter has no verified streaming contract."
63
+ )
64
+
65
+ async def astream(self, text: str) -> AsyncIterator[bytes]:
66
+ for chunk in self.stream(text):
67
+ yield chunk
@@ -0,0 +1,5 @@
1
+ from .HttpTTSMixin import HttpTTSMixin
2
+ from .JsonAudioTTSMixin import JsonAudioTTSMixin
3
+ from .TTSBase import TTSBase
4
+
5
+ __all__ = ["HttpTTSMixin", "JsonAudioTTSMixin", "TTSBase"]