swarmauri-core 0.6.0.dev128__tar.gz → 0.6.0.dev129__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.
- {swarmauri_core-0.6.0.dev128 → swarmauri_core-0.6.0.dev129}/PKG-INFO +1 -1
- {swarmauri_core-0.6.0.dev128 → swarmauri_core-0.6.0.dev129}/pyproject.toml +1 -1
- {swarmauri_core-0.6.0.dev128 → swarmauri_core-0.6.0.dev129}/swarmauri_core/ComponentBase.py +46 -17
- {swarmauri_core-0.6.0.dev128 → swarmauri_core-0.6.0.dev129}/README.md +0 -0
- {swarmauri_core-0.6.0.dev128 → swarmauri_core-0.6.0.dev129}/swarmauri_core/README.md +0 -0
- {swarmauri_core-0.6.0.dev128 → swarmauri_core-0.6.0.dev129}/swarmauri_core/__init__.py +0 -0
- {swarmauri_core-0.6.0.dev128 → swarmauri_core-0.6.0.dev129}/swarmauri_core/agent_apis/IAgentCommands.py +0 -0
- {swarmauri_core-0.6.0.dev128 → swarmauri_core-0.6.0.dev129}/swarmauri_core/agent_apis/IAgentRouterCRUD.py +0 -0
- {swarmauri_core-0.6.0.dev128 → swarmauri_core-0.6.0.dev129}/swarmauri_core/agent_apis/__init__.py +0 -0
- {swarmauri_core-0.6.0.dev128 → swarmauri_core-0.6.0.dev129}/swarmauri_core/agent_factories/IExportConf.py +0 -0
- {swarmauri_core-0.6.0.dev128 → swarmauri_core-0.6.0.dev129}/swarmauri_core/agent_factories/__init__.py +0 -0
- {swarmauri_core-0.6.0.dev128 → swarmauri_core-0.6.0.dev129}/swarmauri_core/agents/IAgent.py +0 -0
- {swarmauri_core-0.6.0.dev128 → swarmauri_core-0.6.0.dev129}/swarmauri_core/agents/IAgentConversation.py +0 -0
- {swarmauri_core-0.6.0.dev128 → swarmauri_core-0.6.0.dev129}/swarmauri_core/agents/IAgentParser.py +0 -0
- {swarmauri_core-0.6.0.dev128 → swarmauri_core-0.6.0.dev129}/swarmauri_core/agents/IAgentRetrieve.py +0 -0
- {swarmauri_core-0.6.0.dev128 → swarmauri_core-0.6.0.dev129}/swarmauri_core/agents/IAgentSystemContext.py +0 -0
- {swarmauri_core-0.6.0.dev128 → swarmauri_core-0.6.0.dev129}/swarmauri_core/agents/IAgentToolkit.py +0 -0
- {swarmauri_core-0.6.0.dev128 → swarmauri_core-0.6.0.dev129}/swarmauri_core/agents/IAgentVectorStore.py +0 -0
- {swarmauri_core-0.6.0.dev128 → swarmauri_core-0.6.0.dev129}/swarmauri_core/agents/__init__.py +0 -0
- {swarmauri_core-0.6.0.dev128 → swarmauri_core-0.6.0.dev129}/swarmauri_core/chains/ICallableChain.py +0 -0
- {swarmauri_core-0.6.0.dev128 → swarmauri_core-0.6.0.dev129}/swarmauri_core/chains/IChain.py +0 -0
- {swarmauri_core-0.6.0.dev128 → swarmauri_core-0.6.0.dev129}/swarmauri_core/chains/IChainContext.py +0 -0
- {swarmauri_core-0.6.0.dev128 → swarmauri_core-0.6.0.dev129}/swarmauri_core/chains/IChainContextLoader.py +0 -0
- {swarmauri_core-0.6.0.dev128 → swarmauri_core-0.6.0.dev129}/swarmauri_core/chains/IChainDependencyResolver.py +0 -0
- {swarmauri_core-0.6.0.dev128 → swarmauri_core-0.6.0.dev129}/swarmauri_core/chains/IChainFactory.py +0 -0
- {swarmauri_core-0.6.0.dev128 → swarmauri_core-0.6.0.dev129}/swarmauri_core/chains/IChainStep.py +0 -0
- {swarmauri_core-0.6.0.dev128 → swarmauri_core-0.6.0.dev129}/swarmauri_core/chains/__init__.py +0 -0
- {swarmauri_core-0.6.0.dev128 → swarmauri_core-0.6.0.dev129}/swarmauri_core/chunkers/IChunker.py +0 -0
- {swarmauri_core-0.6.0.dev128 → swarmauri_core-0.6.0.dev129}/swarmauri_core/chunkers/__init__.py +0 -0
- {swarmauri_core-0.6.0.dev128 → swarmauri_core-0.6.0.dev129}/swarmauri_core/control_panels/IControlPanel.py +0 -0
- {swarmauri_core-0.6.0.dev128 → swarmauri_core-0.6.0.dev129}/swarmauri_core/control_panels/__init__.py +0 -0
- {swarmauri_core-0.6.0.dev128 → swarmauri_core-0.6.0.dev129}/swarmauri_core/conversations/IConversation.py +0 -0
- {swarmauri_core-0.6.0.dev128 → swarmauri_core-0.6.0.dev129}/swarmauri_core/conversations/IMaxSize.py +0 -0
- {swarmauri_core-0.6.0.dev128 → swarmauri_core-0.6.0.dev129}/swarmauri_core/conversations/ISystemContext.py +0 -0
- {swarmauri_core-0.6.0.dev128 → swarmauri_core-0.6.0.dev129}/swarmauri_core/conversations/__init__.py +0 -0
- {swarmauri_core-0.6.0.dev128 → swarmauri_core-0.6.0.dev129}/swarmauri_core/dataconnectors/IDataConnector.py +0 -0
- {swarmauri_core-0.6.0.dev128 → swarmauri_core-0.6.0.dev129}/swarmauri_core/dataconnectors/__init__.py +0 -0
- {swarmauri_core-0.6.0.dev128 → swarmauri_core-0.6.0.dev129}/swarmauri_core/distances/IDistanceSimilarity.py +0 -0
- {swarmauri_core-0.6.0.dev128 → swarmauri_core-0.6.0.dev129}/swarmauri_core/distances/__init__.py +0 -0
- {swarmauri_core-0.6.0.dev128 → swarmauri_core-0.6.0.dev129}/swarmauri_core/document_stores/IDocumentRetrieve.py +0 -0
- {swarmauri_core-0.6.0.dev128 → swarmauri_core-0.6.0.dev129}/swarmauri_core/document_stores/IDocumentStore.py +0 -0
- {swarmauri_core-0.6.0.dev128 → swarmauri_core-0.6.0.dev129}/swarmauri_core/document_stores/__init__.py +0 -0
- {swarmauri_core-0.6.0.dev128 → swarmauri_core-0.6.0.dev129}/swarmauri_core/documents/IDocument.py +0 -0
- {swarmauri_core-0.6.0.dev128 → swarmauri_core-0.6.0.dev129}/swarmauri_core/documents/IExperimentDocument.py +0 -0
- {swarmauri_core-0.6.0.dev128 → swarmauri_core-0.6.0.dev129}/swarmauri_core/documents/__init__.py +0 -0
- {swarmauri_core-0.6.0.dev128 → swarmauri_core-0.6.0.dev129}/swarmauri_core/embeddings/IFeature.py +0 -0
- {swarmauri_core-0.6.0.dev128 → swarmauri_core-0.6.0.dev129}/swarmauri_core/embeddings/ISaveModel.py +0 -0
- {swarmauri_core-0.6.0.dev128 → swarmauri_core-0.6.0.dev129}/swarmauri_core/embeddings/IVectorize.py +0 -0
- {swarmauri_core-0.6.0.dev128 → swarmauri_core-0.6.0.dev129}/swarmauri_core/embeddings/__init__.py +0 -0
- {swarmauri_core-0.6.0.dev128 → swarmauri_core-0.6.0.dev129}/swarmauri_core/experiment_stores/IExperimentStore.py +0 -0
- {swarmauri_core-0.6.0.dev128 → swarmauri_core-0.6.0.dev129}/swarmauri_core/experiment_stores/__init__.py +0 -0
- {swarmauri_core-0.6.0.dev128 → swarmauri_core-0.6.0.dev129}/swarmauri_core/factories/IFactory.py +0 -0
- {swarmauri_core-0.6.0.dev128 → swarmauri_core-0.6.0.dev129}/swarmauri_core/factories/__init__.py +0 -0
- {swarmauri_core-0.6.0.dev128 → swarmauri_core-0.6.0.dev129}/swarmauri_core/image_gens/IGenImage.py +0 -0
- {swarmauri_core-0.6.0.dev128 → swarmauri_core-0.6.0.dev129}/swarmauri_core/image_gens/__init__.py +0 -0
- {swarmauri_core-0.6.0.dev128 → swarmauri_core-0.6.0.dev129}/swarmauri_core/llms/IFit.py +0 -0
- {swarmauri_core-0.6.0.dev128 → swarmauri_core-0.6.0.dev129}/swarmauri_core/llms/IPredict.py +0 -0
- {swarmauri_core-0.6.0.dev128 → swarmauri_core-0.6.0.dev129}/swarmauri_core/llms/__init__.py +0 -0
- {swarmauri_core-0.6.0.dev128 → swarmauri_core-0.6.0.dev129}/swarmauri_core/measurements/IMeasurement.py +0 -0
- {swarmauri_core-0.6.0.dev128 → swarmauri_core-0.6.0.dev129}/swarmauri_core/measurements/IMeasurementAggregate.py +0 -0
- {swarmauri_core-0.6.0.dev128 → swarmauri_core-0.6.0.dev129}/swarmauri_core/measurements/IMeasurementCalculate.py +0 -0
- {swarmauri_core-0.6.0.dev128 → swarmauri_core-0.6.0.dev129}/swarmauri_core/measurements/IThreshold.py +0 -0
- {swarmauri_core-0.6.0.dev128 → swarmauri_core-0.6.0.dev129}/swarmauri_core/measurements/__init__.py +0 -0
- {swarmauri_core-0.6.0.dev128 → swarmauri_core-0.6.0.dev129}/swarmauri_core/messages/IMessage.py +0 -0
- {swarmauri_core-0.6.0.dev128 → swarmauri_core-0.6.0.dev129}/swarmauri_core/messages/__init__.py +0 -0
- {swarmauri_core-0.6.0.dev128 → swarmauri_core-0.6.0.dev129}/swarmauri_core/parsers/IParser.py +0 -0
- {swarmauri_core-0.6.0.dev128 → swarmauri_core-0.6.0.dev129}/swarmauri_core/parsers/__init__.py +0 -0
- {swarmauri_core-0.6.0.dev128 → swarmauri_core-0.6.0.dev129}/swarmauri_core/pipelines/IPipeline.py +0 -0
- {swarmauri_core-0.6.0.dev128 → swarmauri_core-0.6.0.dev129}/swarmauri_core/pipelines/__init__.py +0 -0
- {swarmauri_core-0.6.0.dev128 → swarmauri_core-0.6.0.dev129}/swarmauri_core/prompts/IPrompt.py +0 -0
- {swarmauri_core-0.6.0.dev128 → swarmauri_core-0.6.0.dev129}/swarmauri_core/prompts/IPromptMatrix.py +0 -0
- {swarmauri_core-0.6.0.dev128 → swarmauri_core-0.6.0.dev129}/swarmauri_core/prompts/ITemplate.py +0 -0
- {swarmauri_core-0.6.0.dev128 → swarmauri_core-0.6.0.dev129}/swarmauri_core/prompts/__init__.py +0 -0
- {swarmauri_core-0.6.0.dev128 → swarmauri_core-0.6.0.dev129}/swarmauri_core/schema_converters/ISchemaConvert.py +0 -0
- {swarmauri_core-0.6.0.dev128 → swarmauri_core-0.6.0.dev129}/swarmauri_core/schema_converters/__init__.py +0 -0
- {swarmauri_core-0.6.0.dev128 → swarmauri_core-0.6.0.dev129}/swarmauri_core/service_registries/IServiceRegistry.py +0 -0
- {swarmauri_core-0.6.0.dev128 → swarmauri_core-0.6.0.dev129}/swarmauri_core/service_registries/__init__.py +0 -0
- {swarmauri_core-0.6.0.dev128 → swarmauri_core-0.6.0.dev129}/swarmauri_core/state/IState.py +0 -0
- {swarmauri_core-0.6.0.dev128 → swarmauri_core-0.6.0.dev129}/swarmauri_core/swarm_apis/IAgentRegistrationAPI.py +0 -0
- {swarmauri_core-0.6.0.dev128 → swarmauri_core-0.6.0.dev129}/swarmauri_core/swarm_apis/ISwarmAPI.py +0 -0
- {swarmauri_core-0.6.0.dev128 → swarmauri_core-0.6.0.dev129}/swarmauri_core/swarm_apis/__init__.py +0 -0
- {swarmauri_core-0.6.0.dev128 → swarmauri_core-0.6.0.dev129}/swarmauri_core/swarms/ISwarm.py +0 -0
- {swarmauri_core-0.6.0.dev128 → swarmauri_core-0.6.0.dev129}/swarmauri_core/swarms/__init__.py +0 -0
- {swarmauri_core-0.6.0.dev128 → swarmauri_core-0.6.0.dev129}/swarmauri_core/task_mgmt_strategies/ITaskMgmtStrategy.py +0 -0
- {swarmauri_core-0.6.0.dev128 → swarmauri_core-0.6.0.dev129}/swarmauri_core/task_mgmt_strategies/__init__.py +0 -0
- {swarmauri_core-0.6.0.dev128 → swarmauri_core-0.6.0.dev129}/swarmauri_core/toolkits/IToolkit.py +0 -0
- {swarmauri_core-0.6.0.dev128 → swarmauri_core-0.6.0.dev129}/swarmauri_core/toolkits/__init__.py +0 -0
- {swarmauri_core-0.6.0.dev128 → swarmauri_core-0.6.0.dev129}/swarmauri_core/tools/IParameter.py +0 -0
- {swarmauri_core-0.6.0.dev128 → swarmauri_core-0.6.0.dev129}/swarmauri_core/tools/ITool.py +0 -0
- {swarmauri_core-0.6.0.dev128 → swarmauri_core-0.6.0.dev129}/swarmauri_core/tools/__init__.py +0 -0
- {swarmauri_core-0.6.0.dev128 → swarmauri_core-0.6.0.dev129}/swarmauri_core/tracing/IChainTracer.py +0 -0
- {swarmauri_core-0.6.0.dev128 → swarmauri_core-0.6.0.dev129}/swarmauri_core/tracing/ITraceContext.py +0 -0
- {swarmauri_core-0.6.0.dev128 → swarmauri_core-0.6.0.dev129}/swarmauri_core/tracing/ITracer.py +0 -0
- {swarmauri_core-0.6.0.dev128 → swarmauri_core-0.6.0.dev129}/swarmauri_core/tracing/__init__.py +0 -0
- {swarmauri_core-0.6.0.dev128 → swarmauri_core-0.6.0.dev129}/swarmauri_core/transports/ITransport.py +0 -0
- {swarmauri_core-0.6.0.dev128 → swarmauri_core-0.6.0.dev129}/swarmauri_core/transports/__init__.py +0 -0
- {swarmauri_core-0.6.0.dev128 → swarmauri_core-0.6.0.dev129}/swarmauri_core/utils/ITransactional.py +0 -0
- {swarmauri_core-0.6.0.dev128 → swarmauri_core-0.6.0.dev129}/swarmauri_core/utils/__init__.py +0 -0
- {swarmauri_core-0.6.0.dev128 → swarmauri_core-0.6.0.dev129}/swarmauri_core/vcms/IPredictVision.py +0 -0
- {swarmauri_core-0.6.0.dev128 → swarmauri_core-0.6.0.dev129}/swarmauri_core/vcms/__init__.py +0 -0
- {swarmauri_core-0.6.0.dev128 → swarmauri_core-0.6.0.dev129}/swarmauri_core/vector_stores/ICloudVectorStore.py +0 -0
- {swarmauri_core-0.6.0.dev128 → swarmauri_core-0.6.0.dev129}/swarmauri_core/vector_stores/IPersistentVectorStore.py +0 -0
- {swarmauri_core-0.6.0.dev128 → swarmauri_core-0.6.0.dev129}/swarmauri_core/vector_stores/ISimilarity.py +0 -0
- {swarmauri_core-0.6.0.dev128 → swarmauri_core-0.6.0.dev129}/swarmauri_core/vector_stores/IVectorNorm.py +0 -0
- {swarmauri_core-0.6.0.dev128 → swarmauri_core-0.6.0.dev129}/swarmauri_core/vector_stores/IVectorStore.py +0 -0
- {swarmauri_core-0.6.0.dev128 → swarmauri_core-0.6.0.dev129}/swarmauri_core/vector_stores/IVectorStoreRetrieve.py +0 -0
- {swarmauri_core-0.6.0.dev128 → swarmauri_core-0.6.0.dev129}/swarmauri_core/vector_stores/IVectorStoreSaveLoad.py +0 -0
- {swarmauri_core-0.6.0.dev128 → swarmauri_core-0.6.0.dev129}/swarmauri_core/vector_stores/__init__.py +0 -0
- {swarmauri_core-0.6.0.dev128 → swarmauri_core-0.6.0.dev129}/swarmauri_core/vectors/IVector.py +0 -0
- {swarmauri_core-0.6.0.dev128 → swarmauri_core-0.6.0.dev129}/swarmauri_core/vectors/IVectorMeta.py +0 -0
- {swarmauri_core-0.6.0.dev128 → swarmauri_core-0.6.0.dev129}/swarmauri_core/vectors/IVectorProduct.py +0 -0
- {swarmauri_core-0.6.0.dev128 → swarmauri_core-0.6.0.dev129}/swarmauri_core/vectors/IVectorTransform.py +0 -0
- {swarmauri_core-0.6.0.dev128 → swarmauri_core-0.6.0.dev129}/swarmauri_core/vectors/__init__.py +0 -0
|
@@ -28,7 +28,7 @@ from typing import (
|
|
|
28
28
|
logger = logging.getLogger(__name__)
|
|
29
29
|
T = TypeVar("T", bound="ComponentBase")
|
|
30
30
|
|
|
31
|
-
class SubclassUnion(
|
|
31
|
+
class SubclassUnion(type):
|
|
32
32
|
"""
|
|
33
33
|
A generic class to create discriminated unions based on resource types.
|
|
34
34
|
"""
|
|
@@ -99,7 +99,7 @@ class ComponentBase(BaseModel):
|
|
|
99
99
|
# Class-level registry mapping resource types to their type mappings
|
|
100
100
|
TYPE_REGISTRY: ClassVar[Dict[Type['ComponentBase'], Dict[str, Type['ComponentBase']]]] = {}
|
|
101
101
|
# Model registry mapping models to their resource types
|
|
102
|
-
MODEL_REGISTRY: ClassVar[Dict[Type[BaseModel], Type['ComponentBase']]] = {}
|
|
102
|
+
MODEL_REGISTRY: ClassVar[Dict[Type[BaseModel], List[Type['ComponentBase']]]] = {}
|
|
103
103
|
_lock: ClassVar[Lock] = Lock()
|
|
104
104
|
|
|
105
105
|
name: Optional[str] = None
|
|
@@ -194,9 +194,9 @@ class ComponentBase(BaseModel):
|
|
|
194
194
|
if model_cls not in cls.MODEL_REGISTRY:
|
|
195
195
|
cls.MODEL_REGISTRY[model_cls] = []
|
|
196
196
|
|
|
197
|
-
# Inspect all fields to find SubclassUnion annotations
|
|
197
|
+
# Inspect all fields to find SubclassUnion annotations, including inherited fields
|
|
198
198
|
for field_name, field in model_cls.__fields__.items():
|
|
199
|
-
field_annotation =
|
|
199
|
+
field_annotation = cls.get_field_annotation(model_cls, field_name)
|
|
200
200
|
if not field_annotation:
|
|
201
201
|
continue
|
|
202
202
|
|
|
@@ -208,10 +208,29 @@ class ComponentBase(BaseModel):
|
|
|
208
208
|
if resource_type not in cls.MODEL_REGISTRY[model_cls]:
|
|
209
209
|
cls.MODEL_REGISTRY[model_cls].append(resource_type)
|
|
210
210
|
logger.info(f"Registered model '{model_cls.__name__}' for resource '{resource_type.__name__}'")
|
|
211
|
-
cls.recreate_models()
|
|
212
211
|
return model_cls
|
|
213
212
|
return decorator
|
|
214
213
|
|
|
214
|
+
@classmethod
|
|
215
|
+
def get_field_annotation(cls, model_cls: Type[BaseModel], field_name: str):
|
|
216
|
+
"""
|
|
217
|
+
Retrieve the field annotation for a given field, including inherited fields.
|
|
218
|
+
|
|
219
|
+
Parameters:
|
|
220
|
+
- model_cls: The Pydantic model class.
|
|
221
|
+
- field_name: The name of the field.
|
|
222
|
+
|
|
223
|
+
Returns:
|
|
224
|
+
- The type annotation of the field, or None if not found.
|
|
225
|
+
"""
|
|
226
|
+
for base in inspect.getmro(model_cls):
|
|
227
|
+
if base == object:
|
|
228
|
+
continue
|
|
229
|
+
annotations = getattr(base, '__annotations__', {})
|
|
230
|
+
if field_name in annotations:
|
|
231
|
+
return annotations[field_name]
|
|
232
|
+
return None
|
|
233
|
+
|
|
215
234
|
@classmethod
|
|
216
235
|
def get_class_by_type(cls, resource_type: Type[T], type_name: str) -> Type['ComponentBase']:
|
|
217
236
|
"""
|
|
@@ -248,7 +267,6 @@ class ComponentBase(BaseModel):
|
|
|
248
267
|
return any(cls.field_contains_subclass_union(arg) for arg in args)
|
|
249
268
|
return False
|
|
250
269
|
|
|
251
|
-
|
|
252
270
|
@classmethod
|
|
253
271
|
def extract_resource_types_from_field(cls, field_annotation) -> List[Type['ComponentBase']]:
|
|
254
272
|
"""
|
|
@@ -292,7 +310,6 @@ class ComponentBase(BaseModel):
|
|
|
292
310
|
|
|
293
311
|
return resource_types
|
|
294
312
|
|
|
295
|
-
|
|
296
313
|
@classmethod
|
|
297
314
|
def determine_new_type(cls, field_annotation, resource_type):
|
|
298
315
|
"""
|
|
@@ -367,20 +384,28 @@ class ComponentBase(BaseModel):
|
|
|
367
384
|
|
|
368
385
|
return new_type
|
|
369
386
|
|
|
370
|
-
|
|
371
387
|
@classmethod
|
|
372
388
|
def generate_models_with_fields(cls) -> Dict[Type[BaseModel], Dict[str, Any]]:
|
|
373
389
|
"""
|
|
374
|
-
Automatically generate the models_with_fields dictionary based on registered models
|
|
375
|
-
|
|
390
|
+
Automatically generate the models_with_fields dictionary based on registered models,
|
|
391
|
+
including subclasses that inherit fields using SubclassUnion.
|
|
392
|
+
|
|
376
393
|
Returns:
|
|
377
394
|
- A dictionary mapping model classes to their fields and corresponding resource types.
|
|
378
395
|
"""
|
|
379
396
|
models_with_fields = {}
|
|
380
|
-
|
|
397
|
+
|
|
398
|
+
# Collect all models, including subclasses of registered models
|
|
399
|
+
all_models = set(cls.MODEL_REGISTRY.keys())
|
|
400
|
+
for model_cls in list(all_models):
|
|
401
|
+
for subclass in model_cls.__subclasses__():
|
|
402
|
+
if issubclass(subclass, BaseModel):
|
|
403
|
+
all_models.add(subclass)
|
|
404
|
+
|
|
405
|
+
for model_cls in all_models:
|
|
381
406
|
models_with_fields[model_cls] = {}
|
|
382
|
-
for field_name
|
|
383
|
-
field_annotation =
|
|
407
|
+
for field_name in model_cls.__fields__:
|
|
408
|
+
field_annotation = cls.get_field_annotation(model_cls, field_name)
|
|
384
409
|
if not field_annotation:
|
|
385
410
|
continue
|
|
386
411
|
|
|
@@ -396,6 +421,7 @@ class ComponentBase(BaseModel):
|
|
|
396
421
|
|
|
397
422
|
return models_with_fields
|
|
398
423
|
|
|
424
|
+
|
|
399
425
|
@classmethod
|
|
400
426
|
def recreate_models(cls):
|
|
401
427
|
"""
|
|
@@ -409,8 +435,11 @@ class ComponentBase(BaseModel):
|
|
|
409
435
|
model_class.model_fields[field_name].annotation = new_type
|
|
410
436
|
else:
|
|
411
437
|
raise ValueError(f"Field '{field_name}' does not exist in model '{model_class.__name__}'")
|
|
412
|
-
|
|
438
|
+
try:
|
|
439
|
+
model_class.model_rebuild(force=True)
|
|
413
440
|
logger.debug(f"'{model_class}' has been successfully recreated.")
|
|
414
|
-
|
|
415
|
-
logger.
|
|
416
|
-
|
|
441
|
+
except ValidationError as ve:
|
|
442
|
+
logger.error(f"Validation error while rebuilding model '{model_class.__name__}': {ve}")
|
|
443
|
+
except Exception as e:
|
|
444
|
+
logger.error(f"Error while rebuilding model '{model_class.__name__}': {e}")
|
|
445
|
+
logger.info("All models have been successfully recreated.")
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{swarmauri_core-0.6.0.dev128 → swarmauri_core-0.6.0.dev129}/swarmauri_core/agent_apis/__init__.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{swarmauri_core-0.6.0.dev128 → swarmauri_core-0.6.0.dev129}/swarmauri_core/agents/IAgentParser.py
RENAMED
|
File without changes
|
{swarmauri_core-0.6.0.dev128 → swarmauri_core-0.6.0.dev129}/swarmauri_core/agents/IAgentRetrieve.py
RENAMED
|
File without changes
|
|
File without changes
|
{swarmauri_core-0.6.0.dev128 → swarmauri_core-0.6.0.dev129}/swarmauri_core/agents/IAgentToolkit.py
RENAMED
|
File without changes
|
|
File without changes
|
{swarmauri_core-0.6.0.dev128 → swarmauri_core-0.6.0.dev129}/swarmauri_core/agents/__init__.py
RENAMED
|
File without changes
|
{swarmauri_core-0.6.0.dev128 → swarmauri_core-0.6.0.dev129}/swarmauri_core/chains/ICallableChain.py
RENAMED
|
File without changes
|
|
File without changes
|
{swarmauri_core-0.6.0.dev128 → swarmauri_core-0.6.0.dev129}/swarmauri_core/chains/IChainContext.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
{swarmauri_core-0.6.0.dev128 → swarmauri_core-0.6.0.dev129}/swarmauri_core/chains/IChainFactory.py
RENAMED
|
File without changes
|
{swarmauri_core-0.6.0.dev128 → swarmauri_core-0.6.0.dev129}/swarmauri_core/chains/IChainStep.py
RENAMED
|
File without changes
|
{swarmauri_core-0.6.0.dev128 → swarmauri_core-0.6.0.dev129}/swarmauri_core/chains/__init__.py
RENAMED
|
File without changes
|
{swarmauri_core-0.6.0.dev128 → swarmauri_core-0.6.0.dev129}/swarmauri_core/chunkers/IChunker.py
RENAMED
|
File without changes
|
{swarmauri_core-0.6.0.dev128 → swarmauri_core-0.6.0.dev129}/swarmauri_core/chunkers/__init__.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{swarmauri_core-0.6.0.dev128 → swarmauri_core-0.6.0.dev129}/swarmauri_core/conversations/IMaxSize.py
RENAMED
|
File without changes
|
|
File without changes
|
{swarmauri_core-0.6.0.dev128 → swarmauri_core-0.6.0.dev129}/swarmauri_core/conversations/__init__.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{swarmauri_core-0.6.0.dev128 → swarmauri_core-0.6.0.dev129}/swarmauri_core/distances/__init__.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{swarmauri_core-0.6.0.dev128 → swarmauri_core-0.6.0.dev129}/swarmauri_core/documents/IDocument.py
RENAMED
|
File without changes
|
|
File without changes
|
{swarmauri_core-0.6.0.dev128 → swarmauri_core-0.6.0.dev129}/swarmauri_core/documents/__init__.py
RENAMED
|
File without changes
|
{swarmauri_core-0.6.0.dev128 → swarmauri_core-0.6.0.dev129}/swarmauri_core/embeddings/IFeature.py
RENAMED
|
File without changes
|
{swarmauri_core-0.6.0.dev128 → swarmauri_core-0.6.0.dev129}/swarmauri_core/embeddings/ISaveModel.py
RENAMED
|
File without changes
|
{swarmauri_core-0.6.0.dev128 → swarmauri_core-0.6.0.dev129}/swarmauri_core/embeddings/IVectorize.py
RENAMED
|
File without changes
|
{swarmauri_core-0.6.0.dev128 → swarmauri_core-0.6.0.dev129}/swarmauri_core/embeddings/__init__.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
{swarmauri_core-0.6.0.dev128 → swarmauri_core-0.6.0.dev129}/swarmauri_core/factories/IFactory.py
RENAMED
|
File without changes
|
{swarmauri_core-0.6.0.dev128 → swarmauri_core-0.6.0.dev129}/swarmauri_core/factories/__init__.py
RENAMED
|
File without changes
|
{swarmauri_core-0.6.0.dev128 → swarmauri_core-0.6.0.dev129}/swarmauri_core/image_gens/IGenImage.py
RENAMED
|
File without changes
|
{swarmauri_core-0.6.0.dev128 → swarmauri_core-0.6.0.dev129}/swarmauri_core/image_gens/__init__.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{swarmauri_core-0.6.0.dev128 → swarmauri_core-0.6.0.dev129}/swarmauri_core/measurements/__init__.py
RENAMED
|
File without changes
|
{swarmauri_core-0.6.0.dev128 → swarmauri_core-0.6.0.dev129}/swarmauri_core/messages/IMessage.py
RENAMED
|
File without changes
|
{swarmauri_core-0.6.0.dev128 → swarmauri_core-0.6.0.dev129}/swarmauri_core/messages/__init__.py
RENAMED
|
File without changes
|
{swarmauri_core-0.6.0.dev128 → swarmauri_core-0.6.0.dev129}/swarmauri_core/parsers/IParser.py
RENAMED
|
File without changes
|
{swarmauri_core-0.6.0.dev128 → swarmauri_core-0.6.0.dev129}/swarmauri_core/parsers/__init__.py
RENAMED
|
File without changes
|
{swarmauri_core-0.6.0.dev128 → swarmauri_core-0.6.0.dev129}/swarmauri_core/pipelines/IPipeline.py
RENAMED
|
File without changes
|
{swarmauri_core-0.6.0.dev128 → swarmauri_core-0.6.0.dev129}/swarmauri_core/pipelines/__init__.py
RENAMED
|
File without changes
|
{swarmauri_core-0.6.0.dev128 → swarmauri_core-0.6.0.dev129}/swarmauri_core/prompts/IPrompt.py
RENAMED
|
File without changes
|
{swarmauri_core-0.6.0.dev128 → swarmauri_core-0.6.0.dev129}/swarmauri_core/prompts/IPromptMatrix.py
RENAMED
|
File without changes
|
{swarmauri_core-0.6.0.dev128 → swarmauri_core-0.6.0.dev129}/swarmauri_core/prompts/ITemplate.py
RENAMED
|
File without changes
|
{swarmauri_core-0.6.0.dev128 → swarmauri_core-0.6.0.dev129}/swarmauri_core/prompts/__init__.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{swarmauri_core-0.6.0.dev128 → swarmauri_core-0.6.0.dev129}/swarmauri_core/swarm_apis/ISwarmAPI.py
RENAMED
|
File without changes
|
{swarmauri_core-0.6.0.dev128 → swarmauri_core-0.6.0.dev129}/swarmauri_core/swarm_apis/__init__.py
RENAMED
|
File without changes
|
|
File without changes
|
{swarmauri_core-0.6.0.dev128 → swarmauri_core-0.6.0.dev129}/swarmauri_core/swarms/__init__.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
{swarmauri_core-0.6.0.dev128 → swarmauri_core-0.6.0.dev129}/swarmauri_core/toolkits/IToolkit.py
RENAMED
|
File without changes
|
{swarmauri_core-0.6.0.dev128 → swarmauri_core-0.6.0.dev129}/swarmauri_core/toolkits/__init__.py
RENAMED
|
File without changes
|
{swarmauri_core-0.6.0.dev128 → swarmauri_core-0.6.0.dev129}/swarmauri_core/tools/IParameter.py
RENAMED
|
File without changes
|
|
File without changes
|
{swarmauri_core-0.6.0.dev128 → swarmauri_core-0.6.0.dev129}/swarmauri_core/tools/__init__.py
RENAMED
|
File without changes
|
{swarmauri_core-0.6.0.dev128 → swarmauri_core-0.6.0.dev129}/swarmauri_core/tracing/IChainTracer.py
RENAMED
|
File without changes
|
{swarmauri_core-0.6.0.dev128 → swarmauri_core-0.6.0.dev129}/swarmauri_core/tracing/ITraceContext.py
RENAMED
|
File without changes
|
{swarmauri_core-0.6.0.dev128 → swarmauri_core-0.6.0.dev129}/swarmauri_core/tracing/ITracer.py
RENAMED
|
File without changes
|
{swarmauri_core-0.6.0.dev128 → swarmauri_core-0.6.0.dev129}/swarmauri_core/tracing/__init__.py
RENAMED
|
File without changes
|
{swarmauri_core-0.6.0.dev128 → swarmauri_core-0.6.0.dev129}/swarmauri_core/transports/ITransport.py
RENAMED
|
File without changes
|
{swarmauri_core-0.6.0.dev128 → swarmauri_core-0.6.0.dev129}/swarmauri_core/transports/__init__.py
RENAMED
|
File without changes
|
{swarmauri_core-0.6.0.dev128 → swarmauri_core-0.6.0.dev129}/swarmauri_core/utils/ITransactional.py
RENAMED
|
File without changes
|
{swarmauri_core-0.6.0.dev128 → swarmauri_core-0.6.0.dev129}/swarmauri_core/utils/__init__.py
RENAMED
|
File without changes
|
{swarmauri_core-0.6.0.dev128 → swarmauri_core-0.6.0.dev129}/swarmauri_core/vcms/IPredictVision.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{swarmauri_core-0.6.0.dev128 → swarmauri_core-0.6.0.dev129}/swarmauri_core/vector_stores/__init__.py
RENAMED
|
File without changes
|
{swarmauri_core-0.6.0.dev128 → swarmauri_core-0.6.0.dev129}/swarmauri_core/vectors/IVector.py
RENAMED
|
File without changes
|
{swarmauri_core-0.6.0.dev128 → swarmauri_core-0.6.0.dev129}/swarmauri_core/vectors/IVectorMeta.py
RENAMED
|
File without changes
|
{swarmauri_core-0.6.0.dev128 → swarmauri_core-0.6.0.dev129}/swarmauri_core/vectors/IVectorProduct.py
RENAMED
|
File without changes
|
|
File without changes
|
{swarmauri_core-0.6.0.dev128 → swarmauri_core-0.6.0.dev129}/swarmauri_core/vectors/__init__.py
RENAMED
|
File without changes
|