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.
fix/wrong-imports (#100)
Thomas Hebrardecc83323ce71
diff --git a/pipelex/cogt/content_generation/assignment_models.py b/pipelex/cogt/content_generation/assignment_models.pyindex a02d96bb6..c69a61579 100644--- a/pipelex/cogt/content_generation/assignment_models.py+++ b/pipelex/cogt/content_generation/assignment_models.py@@ -17,7 +17,7 @@ from pipelex.cogt.ocr.ocr_handle import OcrHandlefrom pipelex.cogt.ocr.ocr_input import OcrInputfrom pipelex.cogt.ocr.ocr_job_components import OcrJobConfig, OcrJobParamsfrom pipelex.pipeline.job_metadata import JobMetadata-from pipelex.tools.templating.jinja2_environment import Jinja2TemplateCategory+from pipelex.tools.templating.jinja2_template_category import Jinja2TemplateCategoryfrom pipelex.tools.templating.templating_models import PromptingStylediff --git a/pipelex/cogt/content_generation/content_generator.py b/pipelex/cogt/content_generation/content_generator.pyindex 4e13e72a9..4c1c8a884 100644--- a/pipelex/cogt/content_generation/content_generator.py+++ b/pipelex/cogt/content_generation/content_generator.py@@ -31,7 +31,7 @@ from pipelex.cogt.ocr.ocr_job_components import OcrJobConfig, OcrJobParamsfrom pipelex.cogt.ocr.ocr_output import OcrOutputfrom pipelex.config import get_configfrom pipelex.pipeline.job_metadata import JobMetadata-from pipelex.tools.templating.jinja2_environment import Jinja2TemplateCategory+from pipelex.tools.templating.jinja2_template_category import Jinja2TemplateCategoryfrom pipelex.tools.templating.templating_models import PromptingStylefrom pipelex.tools.typing.pydantic_utils import BaseModelTypeVardiff --git a/pipelex/cogt/content_generation/content_generator_dry.py b/pipelex/cogt/content_generation/content_generator_dry.pyindex 538e8b6f5..e97509026 100644--- a/pipelex/cogt/content_generation/content_generator_dry.py+++ b/pipelex/cogt/content_generation/content_generator_dry.py@@ -18,7 +18,7 @@ from pipelex.cogt.ocr.ocr_job_components import OcrJobConfig, OcrJobParamsfrom pipelex.cogt.ocr.ocr_output import ExtractedImageFromPage, OcrOutput, Pagefrom pipelex.config import get_configfrom pipelex.pipeline.job_metadata import JobMetadata-from pipelex.tools.templating.jinja2_environment import Jinja2TemplateCategory+from pipelex.tools.templating.jinja2_template_category import Jinja2TemplateCategoryfrom pipelex.tools.templating.templating_models import PromptingStylefrom pipelex.tools.typing.pydantic_utils import BaseModelTypeVardiff --git a/pipelex/cogt/content_generation/content_generator_protocol.py b/pipelex/cogt/content_generation/content_generator_protocol.pyindex 52ce35ec9..6945fe22e 100644--- a/pipelex/cogt/content_generation/content_generator_protocol.py+++ b/pipelex/cogt/content_generation/content_generator_protocol.py@@ -13,7 +13,7 @@ from pipelex.cogt.ocr.ocr_input import OcrInputfrom pipelex.cogt.ocr.ocr_job_components import OcrJobConfig, OcrJobParamsfrom pipelex.cogt.ocr.ocr_output import OcrOutputfrom pipelex.pipeline.job_metadata import JobMetadata-from pipelex.tools.templating.jinja2_environment import Jinja2TemplateCategory+from pipelex.tools.templating.jinja2_template_category import Jinja2TemplateCategoryfrom pipelex.tools.templating.templating_models import PromptingStylefrom pipelex.tools.typing.pydantic_utils import BaseModelTypeVardiff --git a/pipelex/core/stuff_artefact.py b/pipelex/core/stuff_artefact.pyindex c457ca3a2..45b8d3b9f 100644--- a/pipelex/core/stuff_artefact.py+++ b/pipelex/core/stuff_artefact.py@@ -6,8 +6,7 @@ from typing_extensions import overridefrom pipelex.core.stuff_content import StuffContentfrom pipelex.exceptions import StuffArtefactError-from pipelex.tools.templating.jinja2_models import Jinja2TaggableAbstract-from pipelex.tools.templating.jinja2_rendering import Jinja2ContextKey+from pipelex.tools.templating.jinja2_models import Jinja2ContextKey, Jinja2TaggableAbstractfrom pipelex.tools.templating.templating_models import TextFormatdiff --git a/pipelex/core/stuff_factory.py b/pipelex/core/stuff_factory.pyindex 64071b3a0..1ce5d6866 100644--- a/pipelex/core/stuff_factory.py+++ b/pipelex/core/stuff_factory.py@@ -5,12 +5,12 @@ from kajson.class_registry import class_registryfrom pydantic import BaseModel, Fieldfrom pipelex.config import get_config-from pipelex.core.concept import Concept, ConceptError+from pipelex.core.concept import Conceptfrom pipelex.core.concept_code_factory import ConceptCodeFactoryfrom pipelex.core.concept_native import NativeConceptfrom pipelex.core.stuff import Stuff, StuffCreationRecordfrom pipelex.core.stuff_content import StuffContent, StuffContentInitableFromStr-from pipelex.exceptions import PipelexError+from pipelex.exceptions import ConceptError, PipelexErrorfrom pipelex.hub import get_required_conceptdiff --git a/pipelex/pipe_controllers/pipe_batch.py b/pipelex/pipe_controllers/pipe_batch.pyindex 190557ccd..39f847d3b 100644--- a/pipelex/pipe_controllers/pipe_batch.py+++ b/pipelex/pipe_controllers/pipe_batch.py@@ -11,8 +11,8 @@ from pipelex.core.pipe_run_params import BatchParams, PipeRunParamsfrom pipelex.core.stuff import Stufffrom pipelex.core.stuff_content import ListContent, StuffContentfrom pipelex.core.stuff_factory import StuffFactory-from pipelex.core.working_memory import MAIN_STUFF_NAME, WorkingMemory, WorkingMemoryStuffNotFoundError-from pipelex.exceptions import PipeInputError, PipeInputNotFoundError+from pipelex.core.working_memory import MAIN_STUFF_NAME, WorkingMemory+from pipelex.exceptions import PipeInputError, PipeInputNotFoundError, WorkingMemoryStuffNotFoundErrorfrom pipelex.hub import get_pipe_router, get_pipeline_tracker, get_required_pipefrom pipelex.pipe_controllers.pipe_controller import PipeControllerfrom pipelex.pipeline.job_metadata import JobMetadatadiff --git a/pipelex/pipe_operators/pipe_img_gen.py b/pipelex/pipe_operators/pipe_img_gen.pyindex 0c6685252..0e53ac9ff 100644--- a/pipelex/pipe_operators/pipe_img_gen.py+++ b/pipelex/pipe_operators/pipe_img_gen.py@@ -9,7 +9,7 @@ from pipelex.cogt.content_generation.content_generator_protocol import ContentGefrom pipelex.cogt.imgg.imgg_handle import ImggHandlefrom pipelex.cogt.imgg.imgg_job_components import AspectRatio, Background, ImggJobParams, Qualityfrom pipelex.cogt.imgg.imgg_prompt import ImggPrompt-from pipelex.config import StaticValidationErrorType, StaticValidationReaction, get_config+from pipelex.config import StaticValidationReaction, get_configfrom pipelex.core.concept_native import NativeConceptfrom pipelex.core.pipe_output import PipeOutputfrom pipelex.core.pipe_run_params import PipeOutputMultiplicity, PipeRunParams, output_multiplicity_to_apply@@ -21,6 +21,7 @@ from pipelex.exceptions import (PipeInputError,PipeRunParamsError,StaticValidationError,+ StaticValidationErrorType,UnexpectedPipeDefinitionError,WorkingMemoryStuffNotFoundError,)diff --git a/pipelex/pipe_operators/pipe_jinja2_factory.py b/pipelex/pipe_operators/pipe_jinja2_factory.pyindex b0dff7f05..21cef0197 100644--- a/pipelex/pipe_operators/pipe_jinja2_factory.py+++ b/pipelex/pipe_operators/pipe_jinja2_factory.py@@ -7,8 +7,8 @@ from pipelex.core.pipe_blueprint import PipeBlueprint, PipeSpecificFactoryProtocfrom pipelex.core.pipe_input_spec import PipeInputSpecfrom pipelex.exceptions import PipeDefinitionErrorfrom pipelex.pipe_operators.pipe_jinja2 import PipeJinja2-from pipelex.tools.templating.jinja2_environment import Jinja2TemplateCategoryfrom pipelex.tools.templating.jinja2_parsing import check_jinja2_parsing+from pipelex.tools.templating.jinja2_template_category import Jinja2TemplateCategoryfrom pipelex.tools.templating.template_preprocessor import preprocess_templatefrom pipelex.tools.templating.templating_models import PromptingStylediff --git a/pipelex/pipe_operators/pipe_llm.py b/pipelex/pipe_operators/pipe_llm.pyindex 756562148..1fb1d74b0 100644--- a/pipelex/pipe_operators/pipe_llm.py+++ b/pipelex/pipe_operators/pipe_llm.py@@ -7,9 +7,8 @@ from typing_extensions import Self, overridefrom pipelex import logfrom pipelex.cogt.content_generation.content_generator_dry import ContentGeneratorDryfrom pipelex.cogt.content_generation.content_generator_protocol import ContentGeneratorProtocol-from pipelex.cogt.llm.llm_models.llm_deck import LLMSettingChoicesfrom pipelex.cogt.llm.llm_models.llm_deck_check import check_llm_setting_with_deck-from pipelex.cogt.llm.llm_models.llm_setting import LLMSetting+from pipelex.cogt.llm.llm_models.llm_setting import LLMSetting, LLMSettingChoicesfrom pipelex.cogt.llm.llm_prompt import LLMPromptfrom pipelex.cogt.llm.llm_prompt_factory_abstract import LLMPromptFactoryAbstractfrom pipelex.config import StaticValidationReaction, get_configdiff --git a/pipelex/pipe_operators/pipe_llm_factory.py b/pipelex/pipe_operators/pipe_llm_factory.pyindex f873ed575..e78058732 100644--- a/pipelex/pipe_operators/pipe_llm_factory.py+++ b/pipelex/pipe_operators/pipe_llm_factory.py@@ -3,8 +3,7 @@ from typing import Any, Dict, List, Optionalfrom pydantic import model_validatorfrom typing_extensions import Self, override-from pipelex.cogt.llm.llm_models.llm_deck import LLMSettingChoices-from pipelex.cogt.llm.llm_models.llm_setting import LLMSettingOrPresetId+from pipelex.cogt.llm.llm_models.llm_setting import LLMSettingChoices, LLMSettingOrPresetIdfrom pipelex.core.pipe_blueprint import PipeBlueprint, PipeSpecificFactoryProtocolfrom pipelex.core.pipe_input_spec import PipeInputSpecfrom pipelex.core.pipe_run_params import make_output_multiplicitydiff --git a/pipelex/pipe_operators/pipe_ocr_factory.py b/pipelex/pipe_operators/pipe_ocr_factory.pyindex 19ba7a48b..fe8460d74 100644--- a/pipelex/pipe_operators/pipe_ocr_factory.py+++ b/pipelex/pipe_operators/pipe_ocr_factory.py@@ -2,8 +2,9 @@ from typing import Any, Dict, Optionalfrom typing_extensions import override-from pipelex.cogt.ocr.ocr_engine_factory import OcrEngineFactory, OcrPlatform+from pipelex.cogt.ocr.ocr_engine_factory import OcrEngineFactoryfrom pipelex.cogt.ocr.ocr_handle import OcrHandle+from pipelex.cogt.ocr.ocr_platform import OcrPlatformfrom pipelex.config import get_configfrom pipelex.core.pipe_blueprint import PipeBlueprint, PipeSpecificFactoryProtocolfrom pipelex.core.pipe_input_spec import PipeInputSpecdiff --git a/pipelex/pipe_works/pipe_router.py b/pipelex/pipe_works/pipe_router.pyindex 9217367f0..5961b3c9e 100644--- a/pipelex/pipe_works/pipe_router.py+++ b/pipelex/pipe_works/pipe_router.py@@ -7,8 +7,9 @@ from pipelex.core.pipe_output import PipeOutputTypefrom pipelex.core.pipe_run_params import PipeRunParamsfrom pipelex.core.working_memory import WorkingMemoryfrom pipelex.hub import get_required_pipe+from pipelex.pipe_works.pipe_job import PipeJobfrom pipelex.pipe_works.pipe_job_factory import PipeJobFactory-from pipelex.pipe_works.pipe_router_protocol import PipeJob, PipeRouterProtocol+from pipelex.pipe_works.pipe_router_protocol import PipeRouterProtocolfrom pipelex.pipeline.job_metadata import JobMetadatadiff --git a/pipelex/pipeline/activity/activity_handler.py b/pipelex/pipeline/activity/activity_handler.pyindex 904efc6bb..e71545be0 100644--- a/pipelex/pipeline/activity/activity_handler.py+++ b/pipelex/pipeline/activity/activity_handler.py@@ -3,7 +3,7 @@ from typing import Set, castfrom pipelex import logfrom pipelex.config import get_config-from pipelex.core.stuff import Stuff, StuffContent+from pipelex.core.stuff import Stufffrom pipelex.core.stuff_content import (HtmlContent,ImageContent,@@ -11,6 +11,7 @@ from pipelex.core.stuff_content import (MermaidContent,NumberContent,StructuredContent,+ StuffContent,TextContent,)from pipelex.pipeline.activity.activity_models import ActivityReportdiff --git a/pipelex/tools/log/log.py b/pipelex/tools/log/log.pyindex 317904b86..c3bc51ff2 100644--- a/pipelex/tools/log/log.py+++ b/pipelex/tools/log/log.py@@ -1,13 +1,10 @@import loggingfrom typing import Any, Dict, Optional, Union-from pipelex.tools.log.log_config import (- LogConfig,- LogLevel,-)+from pipelex.tools.log.log_config import LogConfigfrom pipelex.tools.log.log_dispatch import LogDispatchfrom pipelex.tools.log.log_formatter import EmojiLogFormatter, LevelAndEmojiLogFormatter-from pipelex.tools.log.log_levels import LOGGING_LEVEL_DEV, LOGGING_LEVEL_OFF, LOGGING_LEVEL_VERBOSE+from pipelex.tools.log.log_levels import LOGGING_LEVEL_DEV, LOGGING_LEVEL_OFF, LOGGING_LEVEL_VERBOSE, LogLevelclass Log:diff --git a/pipelex/tools/templating/jinja2_rendering.py b/pipelex/tools/templating/jinja2_rendering.pyindex c63cf1eba..20c2355e1 100644--- a/pipelex/tools/templating/jinja2_rendering.py+++ b/pipelex/tools/templating/jinja2_rendering.py@@ -8,6 +8,7 @@ from jinja2.exceptions import ()from pipelex import log+from pipelex.tools.templating.jinja2_environment import make_jinja2_env_from_template_providerfrom pipelex.tools.templating.jinja2_errors import (Jinja2ContextError,Jinja2RenderError,@@ -15,7 +16,6 @@ from pipelex.tools.templating.jinja2_errors import (make_jinja2_error_explanation,)from pipelex.tools.templating.jinja2_models import Jinja2ContextKey-from pipelex.tools.templating.jinja2_required_variables import make_jinja2_env_from_template_providerfrom pipelex.tools.templating.jinja2_template_category import Jinja2TemplateCategoryfrom pipelex.tools.templating.template_provider_abstract import TemplateProviderAbstractfrom pipelex.tools.templating.templating_models import PromptingStyle