ai-pipeline-core 0.1.4__py3-none-any.whl → 0.1.5__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.
@@ -16,7 +16,7 @@ from .prompt_manager import PromptManager
16
16
  from .settings import settings
17
17
  from .tracing import trace
18
18
 
19
- __version__ = "0.1.2"
19
+ __version__ = "0.1.4"
20
20
 
21
21
  __all__ = [
22
22
  "Document",
@@ -25,7 +25,7 @@ from .mime_type import (
25
25
  class Document(BaseModel, ABC):
26
26
  """Abstract base class for all documents"""
27
27
 
28
- MAX_CONTENT_SIZE: ClassVar[int] = 10 * 1024 * 1024 # 10MB default
28
+ MAX_CONTENT_SIZE: ClassVar[int] = 25 * 1024 * 1024 # 25MB default
29
29
  DESCRIPTION_EXTENSION: ClassVar[str] = ".description.md"
30
30
  MARKDOWN_LIST_SEPARATOR: ClassVar[str] = "\n\n---\n\n"
31
31
 
@@ -105,7 +105,7 @@ class Document(BaseModel, ABC):
105
105
  except TypeError:
106
106
  raise DocumentNameError(f"{cls.__name__}.FILES must be an Enum of string values")
107
107
 
108
- if name not in allowed:
108
+ if len(allowed) > 0 and name not in allowed:
109
109
  allowed_str = ", ".join(sorted(allowed))
110
110
  raise DocumentNameError(f"Invalid filename '{name}'. Allowed names: {allowed_str}")
111
111
 
@@ -103,6 +103,7 @@ def trace(
103
103
  ignore_inputs: list[str] | None = None,
104
104
  input_formatter: Callable[..., str] | None = None,
105
105
  output_formatter: Callable[..., str] | None = None,
106
+ preserve_global_context: bool = True,
106
107
  ) -> Callable[[Callable[P, R]], Callable[P, R]] | Callable[P, R]:
107
108
  """Decorator that wires Laminar tracing and observation into a function.
108
109
 
@@ -136,6 +137,7 @@ def trace(
136
137
  _ignore_inputs = ignore_inputs
137
138
  _input_formatter = input_formatter
138
139
  _output_formatter = output_formatter
140
+ _preserve_global_context = preserve_global_context
139
141
 
140
142
  # --- Check debug_only flag and environment variable ---
141
143
  if debug_only and os.getenv("LMNR_DEBUG", "").lower() != "true":
@@ -173,6 +175,8 @@ def trace(
173
175
  observe_params["input_formatter"] = _input_formatter
174
176
  if _output_formatter is not None:
175
177
  observe_params["output_formatter"] = _output_formatter
178
+ if _preserve_global_context:
179
+ observe_params["preserve_global_context"] = _preserve_global_context
176
180
 
177
181
  return observe_params
178
182
 
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: ai-pipeline-core
3
- Version: 0.1.4
3
+ Version: 0.1.5
4
4
  Summary: Core utilities for AI-powered processing pipelines using prefect
5
5
  Project-URL: Homepage, https://github.com/bbarwik/ai-pipeline-core
6
6
  Project-URL: Repository, https://github.com/bbarwik/ai-pipeline-core
@@ -20,7 +20,7 @@ Classifier: Typing :: Typed
20
20
  Requires-Python: >=3.12
21
21
  Requires-Dist: httpx>=0.28.1
22
22
  Requires-Dist: jinja2>=3.1.6
23
- Requires-Dist: lmnr>=0.7.4
23
+ Requires-Dist: lmnr>=0.7.5
24
24
  Requires-Dist: openai>=1.99.9
25
25
  Requires-Dist: prefect>=3.4.13
26
26
  Requires-Dist: pydantic-settings>=2.10.1
@@ -471,7 +471,7 @@ Built with:
471
471
 
472
472
  ## Stability Notice
473
473
 
474
- **Current Version**: 0.1.2
474
+ **Current Version**: 0.1.5
475
475
  **Status**: Internal Preview
476
476
  **API Stability**: Unstable - Breaking changes expected
477
477
  **Recommended Use**: Learning and reference only
@@ -1,11 +1,11 @@
1
- ai_pipeline_core/__init__.py,sha256=qJfrXgVvGcXERAsm0EB-5MgxlQjnrnirnRqi12O3B80,779
1
+ ai_pipeline_core/__init__.py,sha256=xjZh6D4fkepTm3LK42qaTpNHgN2meK4uthrW9pjwLfE,779
2
2
  ai_pipeline_core/exceptions.py,sha256=_vW0Hbw2LGb5tcVvH0YzTKMff7QOPfCRr3w-w_zPyCE,968
3
3
  ai_pipeline_core/prompt_manager.py,sha256=XmNUdMIC0WrE9fF0LIcfozAKOGrlYwj8AfXvCndIH-o,4693
4
4
  ai_pipeline_core/py.typed,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
5
5
  ai_pipeline_core/settings.py,sha256=Zl2BPa6IHzh-B5V7cg5mtySr1dhWZQYYKxXz3BwrHlQ,615
6
- ai_pipeline_core/tracing.py,sha256=UcQ_z1F8KrBLq5ZJaXyoIZsiMdqjHzBhADV07pYXY-w,7663
6
+ ai_pipeline_core/tracing.py,sha256=_bijptKWXh7V_xENFQGF11-B70rOGwV6g0qdBoF-VCw,7890
7
7
  ai_pipeline_core/documents/__init__.py,sha256=rEnKj-sSlZ9WnFlZAmSGVi1P8vnsHmU9O9_YwtP40ms,242
8
- ai_pipeline_core/documents/document.py,sha256=LNKomZnkhgiJHuH2pIzZJUHwrl1rBMBypOiSKg_AcHY,10068
8
+ ai_pipeline_core/documents/document.py,sha256=cKa9v0GpDYh48Aqj0u_tCwh4_uCcn5YsKzC537f0v0I,10089
9
9
  ai_pipeline_core/documents/document_list.py,sha256=HOG_uZDazA9CJB7Lr_tNcDFzb5Ff9RUt0ELWQK_eYNM,4940
10
10
  ai_pipeline_core/documents/flow_document.py,sha256=qsV-2JYOMhkvAj7lW54ZNH_4QUclld9h06CoU59tWww,815
11
11
  ai_pipeline_core/documents/mime_type.py,sha256=tMWGH9PVmHe6a_IzdaJUqIHf4qnwQOwOCBhsgW2AyTE,2244
@@ -23,7 +23,7 @@ ai_pipeline_core/logging/__init__.py,sha256=DOO6ckgnMVXl29Sy7q6jhO-iW96h54pCHQDz
23
23
  ai_pipeline_core/logging/logging.yml,sha256=YTW48keO_K5bkkb-KXGM7ZuaYKiquLsjsURei8Ql0V4,1353
24
24
  ai_pipeline_core/logging/logging_config.py,sha256=6MBz9nnVNvqiLDoyy9-R3sWkn6927Re5hdz4hwTptpI,4903
25
25
  ai_pipeline_core/logging/logging_mixin.py,sha256=RDaR2ju2-vKTJRzXGa0DquGPT8_UxahWjvKJnaD0IV8,7810
26
- ai_pipeline_core-0.1.4.dist-info/METADATA,sha256=oB5vtkmCTKTlJKiTetHT8Lt8PKgYEAihOGIlKsD8tSQ,15869
27
- ai_pipeline_core-0.1.4.dist-info/WHEEL,sha256=qtCwoSJWgHk21S1Kb4ihdzI2rlJ1ZKaIurTj_ngOhyQ,87
28
- ai_pipeline_core-0.1.4.dist-info/licenses/LICENSE,sha256=kKj8mfbdWwkyG3U6n7ztB3bAZlEwShTkAsvaY657i3I,1074
29
- ai_pipeline_core-0.1.4.dist-info/RECORD,,
26
+ ai_pipeline_core-0.1.5.dist-info/METADATA,sha256=U1OIPjGwAGsuyJ3QnhUtJQWMzj-OqkXDuyH6cW8Dq70,15869
27
+ ai_pipeline_core-0.1.5.dist-info/WHEEL,sha256=qtCwoSJWgHk21S1Kb4ihdzI2rlJ1ZKaIurTj_ngOhyQ,87
28
+ ai_pipeline_core-0.1.5.dist-info/licenses/LICENSE,sha256=kKj8mfbdWwkyG3U6n7ztB3bAZlEwShTkAsvaY657i3I,1074
29
+ ai_pipeline_core-0.1.5.dist-info/RECORD,,