ai-pipeline-core 0.2.9__py3-none-any.whl → 0.3.0__py3-none-any.whl
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.
- ai_pipeline_core/__init__.py +14 -4
- ai_pipeline_core/deployment/__init__.py +46 -0
- ai_pipeline_core/deployment/base.py +681 -0
- ai_pipeline_core/deployment/contract.py +84 -0
- ai_pipeline_core/deployment/helpers.py +98 -0
- ai_pipeline_core/documents/flow_document.py +1 -1
- ai_pipeline_core/documents/task_document.py +1 -1
- ai_pipeline_core/documents/temporary_document.py +1 -1
- ai_pipeline_core/flow/config.py +13 -2
- ai_pipeline_core/flow/options.py +1 -1
- ai_pipeline_core/llm/client.py +1 -3
- ai_pipeline_core/llm/model_types.py +0 -1
- ai_pipeline_core/pipeline.py +1 -1
- ai_pipeline_core/progress.py +127 -0
- ai_pipeline_core/prompt_builder/__init__.py +5 -0
- ai_pipeline_core/prompt_builder/documents_prompt.jinja2 +23 -0
- ai_pipeline_core/prompt_builder/global_cache.py +78 -0
- ai_pipeline_core/prompt_builder/new_core_documents_prompt.jinja2 +6 -0
- ai_pipeline_core/prompt_builder/prompt_builder.py +253 -0
- ai_pipeline_core/prompt_builder/system_prompt.jinja2 +41 -0
- ai_pipeline_core/tracing.py +1 -1
- ai_pipeline_core/utils/remote_deployment.py +37 -187
- {ai_pipeline_core-0.2.9.dist-info → ai_pipeline_core-0.3.0.dist-info}/METADATA +23 -20
- ai_pipeline_core-0.3.0.dist-info/RECORD +49 -0
- {ai_pipeline_core-0.2.9.dist-info → ai_pipeline_core-0.3.0.dist-info}/WHEEL +1 -1
- ai_pipeline_core/simple_runner/__init__.py +0 -14
- ai_pipeline_core/simple_runner/cli.py +0 -254
- ai_pipeline_core/simple_runner/simple_runner.py +0 -247
- ai_pipeline_core-0.2.9.dist-info/RECORD +0 -41
- {ai_pipeline_core-0.2.9.dist-info → ai_pipeline_core-0.3.0.dist-info}/licenses/LICENSE +0 -0
ai_pipeline_core/__init__.py
CHANGED
|
@@ -82,7 +82,8 @@ Optional Environment Variables:
|
|
|
82
82
|
- LMNR_DEBUG: Set to "true" to enable debug-level traces
|
|
83
83
|
"""
|
|
84
84
|
|
|
85
|
-
from . import llm
|
|
85
|
+
from . import llm, progress
|
|
86
|
+
from .deployment import DeploymentContext, DeploymentResult, PipelineDeployment
|
|
86
87
|
from .documents import (
|
|
87
88
|
Document,
|
|
88
89
|
DocumentList,
|
|
@@ -114,11 +115,13 @@ from .logging import (
|
|
|
114
115
|
from .logging import get_pipeline_logger as get_logger
|
|
115
116
|
from .pipeline import pipeline_flow, pipeline_task
|
|
116
117
|
from .prefect import disable_run_logger, prefect_test_harness
|
|
118
|
+
from .prompt_builder import EnvironmentVariable, PromptBuilder
|
|
117
119
|
from .prompt_manager import PromptManager
|
|
118
120
|
from .settings import Settings
|
|
119
121
|
from .tracing import TraceInfo, TraceLevel, set_trace_cost, trace
|
|
122
|
+
from .utils.remote_deployment import remote_deployment
|
|
120
123
|
|
|
121
|
-
__version__ = "0.
|
|
124
|
+
__version__ = "0.3.0"
|
|
122
125
|
|
|
123
126
|
__all__ = [
|
|
124
127
|
# Config/Settings
|
|
@@ -148,6 +151,12 @@ __all__ = [
|
|
|
148
151
|
# Prefect decorators (clean, no tracing)
|
|
149
152
|
"prefect_test_harness",
|
|
150
153
|
"disable_run_logger",
|
|
154
|
+
# Deployment
|
|
155
|
+
"PipelineDeployment",
|
|
156
|
+
"DeploymentContext",
|
|
157
|
+
"DeploymentResult",
|
|
158
|
+
"remote_deployment",
|
|
159
|
+
"progress",
|
|
151
160
|
# LLM
|
|
152
161
|
"llm", # for backward compatibility
|
|
153
162
|
"generate",
|
|
@@ -163,8 +172,9 @@ __all__ = [
|
|
|
163
172
|
"TraceLevel",
|
|
164
173
|
"TraceInfo",
|
|
165
174
|
"set_trace_cost",
|
|
175
|
+
# Prompt Builder
|
|
176
|
+
"PromptBuilder",
|
|
177
|
+
"EnvironmentVariable",
|
|
166
178
|
# Utils
|
|
167
179
|
"PromptManager",
|
|
168
|
-
"generate",
|
|
169
|
-
"generate_structured",
|
|
170
180
|
]
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
"""Pipeline deployment utilities for unified, type-safe deployments.
|
|
2
|
+
|
|
3
|
+
@public
|
|
4
|
+
|
|
5
|
+
This module provides the PipelineDeployment base class and related types
|
|
6
|
+
for creating pipeline deployments that work seamlessly across local testing,
|
|
7
|
+
CLI execution, and production Prefect deployments.
|
|
8
|
+
|
|
9
|
+
Example:
|
|
10
|
+
>>> from ai_pipeline_core import PipelineDeployment, DeploymentContext, DeploymentResult
|
|
11
|
+
>>>
|
|
12
|
+
>>> class MyResult(DeploymentResult):
|
|
13
|
+
... report: str
|
|
14
|
+
>>>
|
|
15
|
+
>>> class MyPipeline(PipelineDeployment[MyOptions, MyResult]):
|
|
16
|
+
... flows = [step_01, step_02]
|
|
17
|
+
...
|
|
18
|
+
... @staticmethod
|
|
19
|
+
... def build_result(project_name, documents, options):
|
|
20
|
+
... return MyResult(success=True, report="Done")
|
|
21
|
+
>>>
|
|
22
|
+
>>> pipeline = MyPipeline()
|
|
23
|
+
>>> result = pipeline.run_local("test", documents, options)
|
|
24
|
+
"""
|
|
25
|
+
|
|
26
|
+
from .base import DeploymentContext, DeploymentResult, PipelineDeployment
|
|
27
|
+
from .contract import (
|
|
28
|
+
CompletedRun,
|
|
29
|
+
DeploymentResultData,
|
|
30
|
+
FailedRun,
|
|
31
|
+
PendingRun,
|
|
32
|
+
ProgressRun,
|
|
33
|
+
RunResponse,
|
|
34
|
+
)
|
|
35
|
+
|
|
36
|
+
__all__ = [
|
|
37
|
+
"CompletedRun",
|
|
38
|
+
"DeploymentContext",
|
|
39
|
+
"DeploymentResult",
|
|
40
|
+
"DeploymentResultData",
|
|
41
|
+
"FailedRun",
|
|
42
|
+
"PendingRun",
|
|
43
|
+
"PipelineDeployment",
|
|
44
|
+
"ProgressRun",
|
|
45
|
+
"RunResponse",
|
|
46
|
+
]
|