Build AI methods with your coding agent, then run them anywhere: as an MCP for chatbots, as a webapp for people, or via API for your software.
added add_domains for consistency
Louis Choquel965e7e1a36d7
diff --git a/pipelex/core/domains/domain_library.py b/pipelex/core/domains/domain_library.pyindex f9a0abe14..9574d0026 100644--- a/pipelex/core/domains/domain_library.py+++ b/pipelex/core/domains/domain_library.py@@ -28,6 +28,10 @@ class DomainLibrary(RootModel[DomainLibraryRoot], DomainProviderAbstract):else:self.root[domain_code] = domain+ def add_domains(self, domains: list[Domain]):+ for domain in domains:+ self.add_domain(domain=domain)+def remove_domain_by_code(self, domain_code: str) -> None:if domain_code in self.root:del self.root[domain_code]diff --git a/pipelex/libraries/library_manager.py b/pipelex/libraries/library_manager.pyindex 1186486d2..5bdf0a9fa 100644--- a/pipelex/libraries/library_manager.py+++ b/pipelex/libraries/library_manager.py@@ -280,8 +280,7 @@ class LibraryManager(LibraryManagerAbstract):msg = f"Could not load domain from PLX blueprint at '{blueprint.source}', domain code: '{blueprint.domain}': {exc}"raise LibraryLoadingError(msg) from excall_domains.append(domain)- for domain in all_domains:- self.domain_library.add_domain(domain=domain)+ self.domain_library.add_domains(domains=all_domains)# Load all concepts secondall_concepts: list[Concept] = []