gllm-pipeline-binary 0.4.21__cp312-cp312-macosx_13_0_arm64.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.
Files changed (77) hide show
  1. gllm_pipeline/__init__.pyi +0 -0
  2. gllm_pipeline/alias.pyi +7 -0
  3. gllm_pipeline/exclusions/__init__.pyi +4 -0
  4. gllm_pipeline/exclusions/exclusion_manager.pyi +74 -0
  5. gllm_pipeline/exclusions/exclusion_set.pyi +46 -0
  6. gllm_pipeline/pipeline/__init__.pyi +4 -0
  7. gllm_pipeline/pipeline/composer/__init__.pyi +8 -0
  8. gllm_pipeline/pipeline/composer/composer.pyi +350 -0
  9. gllm_pipeline/pipeline/composer/guard_composer.pyi +58 -0
  10. gllm_pipeline/pipeline/composer/if_else_composer.pyi +57 -0
  11. gllm_pipeline/pipeline/composer/parallel_composer.pyi +47 -0
  12. gllm_pipeline/pipeline/composer/switch_composer.pyi +57 -0
  13. gllm_pipeline/pipeline/composer/toggle_composer.pyi +48 -0
  14. gllm_pipeline/pipeline/pipeline.pyi +280 -0
  15. gllm_pipeline/pipeline/states.pyi +139 -0
  16. gllm_pipeline/router/__init__.pyi +6 -0
  17. gllm_pipeline/router/aurelio_semantic_router/__init__.pyi +3 -0
  18. gllm_pipeline/router/aurelio_semantic_router/aurelio_semantic_router.pyi +86 -0
  19. gllm_pipeline/router/aurelio_semantic_router/bytes_compat_route.pyi +40 -0
  20. gllm_pipeline/router/aurelio_semantic_router/encoders/__init__.pyi +5 -0
  21. gllm_pipeline/router/aurelio_semantic_router/encoders/em_invoker_encoder.pyi +46 -0
  22. gllm_pipeline/router/aurelio_semantic_router/encoders/langchain_encoder.pyi +50 -0
  23. gllm_pipeline/router/aurelio_semantic_router/encoders/tei_encoder.pyi +49 -0
  24. gllm_pipeline/router/aurelio_semantic_router/index/__init__.pyi +4 -0
  25. gllm_pipeline/router/aurelio_semantic_router/index/aurelio_index.pyi +65 -0
  26. gllm_pipeline/router/aurelio_semantic_router/index/azure_ai_search_aurelio_index.pyi +71 -0
  27. gllm_pipeline/router/aurelio_semantic_router/index/vector_store_adapter_index.pyi +119 -0
  28. gllm_pipeline/router/lm_based_router.pyi +60 -0
  29. gllm_pipeline/router/preset/__init__.pyi +0 -0
  30. gllm_pipeline/router/preset/aurelio/__init__.pyi +0 -0
  31. gllm_pipeline/router/preset/aurelio/router_image_domain_specific.pyi +21 -0
  32. gllm_pipeline/router/preset/lm_based/__init__.pyi +0 -0
  33. gllm_pipeline/router/preset/lm_based/router_image_domain_specific.pyi +14 -0
  34. gllm_pipeline/router/preset/preset_loader.pyi +24 -0
  35. gllm_pipeline/router/router.pyi +46 -0
  36. gllm_pipeline/router/rule_based_router.pyi +80 -0
  37. gllm_pipeline/router/similarity_based_router.pyi +72 -0
  38. gllm_pipeline/router/utils.pyi +26 -0
  39. gllm_pipeline/steps/__init__.pyi +17 -0
  40. gllm_pipeline/steps/_func.pyi +958 -0
  41. gllm_pipeline/steps/branching_step.pyi +24 -0
  42. gllm_pipeline/steps/component_step.pyi +82 -0
  43. gllm_pipeline/steps/composite_step.pyi +65 -0
  44. gllm_pipeline/steps/conditional_step.pyi +161 -0
  45. gllm_pipeline/steps/guard_step.pyi +71 -0
  46. gllm_pipeline/steps/log_step.pyi +53 -0
  47. gllm_pipeline/steps/map_reduce_step.pyi +92 -0
  48. gllm_pipeline/steps/no_op_step.pyi +40 -0
  49. gllm_pipeline/steps/parallel_step.pyi +128 -0
  50. gllm_pipeline/steps/pipeline_step.pyi +231 -0
  51. gllm_pipeline/steps/state_operator_step.pyi +75 -0
  52. gllm_pipeline/steps/step_error_handler/__init__.pyi +6 -0
  53. gllm_pipeline/steps/step_error_handler/empty_step_error_handler.pyi +20 -0
  54. gllm_pipeline/steps/step_error_handler/fallback_step_error_handler.pyi +24 -0
  55. gllm_pipeline/steps/step_error_handler/keep_step_error_handler.pyi +9 -0
  56. gllm_pipeline/steps/step_error_handler/raise_step_error_handler.pyi +9 -0
  57. gllm_pipeline/steps/step_error_handler/step_error_handler.pyi +46 -0
  58. gllm_pipeline/steps/subgraph_step.pyi +90 -0
  59. gllm_pipeline/steps/terminator_step.pyi +57 -0
  60. gllm_pipeline/types.pyi +10 -0
  61. gllm_pipeline/utils/__init__.pyi +9 -0
  62. gllm_pipeline/utils/async_utils.pyi +21 -0
  63. gllm_pipeline/utils/copy.pyi +11 -0
  64. gllm_pipeline/utils/error_handling.pyi +61 -0
  65. gllm_pipeline/utils/graph.pyi +16 -0
  66. gllm_pipeline/utils/has_inputs_mixin.pyi +50 -0
  67. gllm_pipeline/utils/input_map.pyi +12 -0
  68. gllm_pipeline/utils/mermaid.pyi +29 -0
  69. gllm_pipeline/utils/retry_converter.pyi +25 -0
  70. gllm_pipeline/utils/step_execution.pyi +19 -0
  71. gllm_pipeline.build/.gitignore +1 -0
  72. gllm_pipeline.cpython-312-darwin.so +0 -0
  73. gllm_pipeline.pyi +86 -0
  74. gllm_pipeline_binary-0.4.21.dist-info/METADATA +105 -0
  75. gllm_pipeline_binary-0.4.21.dist-info/RECORD +77 -0
  76. gllm_pipeline_binary-0.4.21.dist-info/WHEEL +5 -0
  77. gllm_pipeline_binary-0.4.21.dist-info/top_level.txt +1 -0
@@ -0,0 +1,57 @@
1
+ from gllm_pipeline.alias import PipelineState as PipelineState
2
+ from gllm_pipeline.steps.pipeline_step import BasePipelineStep as BasePipelineStep
3
+ from langgraph.graph import StateGraph as StateGraph
4
+ from langgraph.runtime import Runtime as Runtime
5
+ from langgraph.types import RetryPolicy as RetryPolicy
6
+ from pydantic import BaseModel as BaseModel
7
+ from typing import Any
8
+
9
+ class TerminatorStep(BasePipelineStep):
10
+ '''A step that connects previous steps to the END node.
11
+
12
+ This step is useful when you want to explicitly terminate a branch or the entire pipeline.
13
+ It has no processing logic and simply acts as a connection point to the END node.
14
+
15
+ Example:
16
+ ```python
17
+ pipeline = (
18
+ step_a
19
+ | ConditionalStep(
20
+ name="branch",
21
+ branches={
22
+ "terminate": TerminatorStep("early_end"),
23
+ "continue": step_b
24
+ },
25
+ condition=lambda x: "terminate" if x["should_stop"] else "continue"
26
+ )
27
+ | step_c
28
+ )
29
+ ```
30
+
31
+ Attributes:
32
+ name (str): A unique identifier for this pipeline step.
33
+ retry_policy (RetryPolicy | None): Configuration for retry behavior using LangGraph\'s RetryPolicy.
34
+ '''
35
+ def add_to_graph(self, graph: StateGraph, previous_endpoints: list[str], retry_policy: RetryPolicy | None = None) -> list[str]:
36
+ """Adds this step to the graph and connects it to the END node.
37
+
38
+ This method is used by `Pipeline` to manage the pipeline's execution flow.
39
+ It should not be called directly by users.
40
+
41
+ Args:
42
+ graph (StateGraph): The graph to add this step to.
43
+ previous_endpoints (list[str]): The endpoints from previous steps to connect to.
44
+ retry_policy (RetryPolicy | None): Configuration for retry behavior using LangGraph's RetryPolicy.
45
+ If None, the retry policy of the step is used. If the step is not a retryable step,
46
+ this parameter is ignored.
47
+
48
+ Returns:
49
+ list[str]: Empty list as this step has no endpoints (it terminates the flow).
50
+ """
51
+ async def execute(self, state: PipelineState, runtime: Runtime[dict[str, Any] | BaseModel]) -> None:
52
+ """Executes this step, which does nothing but pass through the state.
53
+
54
+ Args:
55
+ state (PipelineState): The current pipeline state.
56
+ runtime (Runtime[dict[str, Any] | BaseModel]): The runtime information.
57
+ """
@@ -0,0 +1,10 @@
1
+ from dataclasses import dataclass
2
+
3
+ @dataclass(frozen=True)
4
+ class Val:
5
+ """A value wrapper that represents a fixed/literal input.
6
+
7
+ Attributes:
8
+ value (object): The literal value of the input.
9
+ """
10
+ value: object
@@ -0,0 +1,9 @@
1
+ from gllm_pipeline.utils.async_utils import execute_callable as execute_callable
2
+ from gllm_pipeline.utils.error_handling import ErrorContext as ErrorContext, ValidationError as ValidationError, create_error_context as create_error_context
3
+ from gllm_pipeline.utils.graph import create_edge as create_edge
4
+ from gllm_pipeline.utils.has_inputs_mixin import HasInputsMixin as HasInputsMixin
5
+ from gllm_pipeline.utils.mermaid import combine_mermaid_diagrams as combine_mermaid_diagrams, extract_step_diagrams as extract_step_diagrams
6
+ from gllm_pipeline.utils.retry_converter import retry_config_to_langgraph_policy as retry_config_to_langgraph_policy
7
+ from gllm_pipeline.utils.step_execution import execute_sequential_steps as execute_sequential_steps
8
+
9
+ __all__ = ['ErrorContext', 'HasInputsMixin', 'ValidationError', 'combine_mermaid_diagrams', 'create_edge', 'create_error_context', 'execute_callable', 'execute_sequential_steps', 'extract_step_diagrams', 'retry_config_to_langgraph_policy']
@@ -0,0 +1,21 @@
1
+ from typing import Any, Callable
2
+
3
+ async def execute_callable(func: Callable[..., Any], *args: Any, **kwargs: Any) -> Any:
4
+ """Execute a callable function, handling both synchronous and asynchronous functions.
5
+
6
+ This utility function automatically detects whether the provided function is synchronous
7
+ or asynchronous and executes it appropriately:
8
+ 1. For async functions: calls them directly with await
9
+ 2. For sync functions: runs them in a thread pool to avoid blocking the event loop
10
+
11
+ Args:
12
+ func (Callable[..., Any]): The function to execute. Can be either sync or async.
13
+ *args: Positional arguments to pass to the function.
14
+ **kwargs: Keyword arguments to pass to the function.
15
+
16
+ Returns:
17
+ Any: The result of the function execution.
18
+
19
+ Raises:
20
+ Exception: Any exception raised by the function execution.
21
+ """
@@ -0,0 +1,11 @@
1
+ from typing import Any
2
+
3
+ def safe_deepcopy(obj: Any) -> Any:
4
+ """Deepcopy an object gracefully.
5
+
6
+ Args:
7
+ obj (Any): The object to copy.
8
+
9
+ Returns:
10
+ Any: The deep copied object, or the original object if deepcopy fails.
11
+ """
@@ -0,0 +1,61 @@
1
+ from _typeshed import Incomplete
2
+ from gllm_pipeline.alias import PipelineState as PipelineState
3
+ from pydantic import BaseModel
4
+ from typing import Any
5
+
6
+ class ErrorContext(BaseModel):
7
+ '''Standardized error context for pipeline steps.
8
+
9
+ This model provides a structured way to represent error context information
10
+ for pipeline steps, ensuring consistency in error messages across the pipeline.
11
+
12
+ Attributes:
13
+ exception (BaseException): The exception that was raised.
14
+ step_name (str): The name of the pipeline step where the error occurred.
15
+ step_type (str): The type of pipeline step where the error occurred.
16
+ state (PipelineState | None): The pipeline state at the time of the error.
17
+ Defaults to None.
18
+ operation (str): Description of the operation being performed when the error occurred.
19
+ Defaults to "execution".
20
+ additional_context (str | None): Additional context to include in the error message.
21
+ Defaults to None.
22
+ '''
23
+ model_config: Incomplete
24
+ exception: BaseException
25
+ step_name: str
26
+ step_type: str
27
+ state: PipelineState | None
28
+ operation: str
29
+ additional_context: str | None
30
+
31
+ class ValidationError(Exception):
32
+ """Exception raised for errors in state validation.
33
+
34
+ This exception is raised when input validation fails in pipeline steps.
35
+ It provides more specific error information than a generic RuntimeError.
36
+
37
+ Attributes:
38
+ message (str): The error message explaining the validation failure.
39
+ """
40
+ message: Incomplete
41
+ def __init__(self, message: str) -> None:
42
+ """Initialize with an error message.
43
+
44
+ Args:
45
+ message (str): The error message explaining what validation failed.
46
+ """
47
+
48
+ def create_error_context(exception: Exception, step_name: str, step_type: str, state: dict[str, Any], operation: str, **kwargs) -> ErrorContext:
49
+ """Create standardized error context for composite steps.
50
+
51
+ Args:
52
+ exception (Exception): The exception that occurred.
53
+ step_name (str): Name of the step.
54
+ step_type (str): Type of the step.
55
+ state (dict[str, Any]): Pipeline state at time of error.
56
+ operation (str): Operation being performed.
57
+ **kwargs (dict[str, Any]): Additional context key-value pairs.
58
+
59
+ Returns:
60
+ ErrorContext: ErrorContext object with standardized information.
61
+ """
@@ -0,0 +1,16 @@
1
+ from langgraph.graph import StateGraph as StateGraph
2
+
3
+ def create_edge(graph: StateGraph, sources: str | list[str], target: str) -> None:
4
+ """Create edges from source nodes to target node in the graph.
5
+
6
+ Special handling:
7
+ - START cannot participate in a fan-in. If present, add a direct START -> target edge
8
+ separately and only fan-in non-START sources.
9
+
10
+ Args:
11
+ graph (StateGraph): The graph to add edges to.
12
+ sources (str | list[str]): The source nodes. If str or list of 1 element,
13
+ connect directly. If list > 1 elements, use the list for fan-in. If empty list,
14
+ do nothing.
15
+ target (str): The target node.
16
+ """
@@ -0,0 +1,50 @@
1
+ from _typeshed import Incomplete
2
+ from gllm_pipeline.alias import PipelineState as PipelineState
3
+ from gllm_pipeline.types import Val as Val
4
+ from gllm_pipeline.utils.input_map import shallow_dump as shallow_dump
5
+ from langgraph.runtime import Runtime as Runtime
6
+ from pydantic import BaseModel as BaseModel
7
+ from typing import Any
8
+
9
+ class HasInputsMixin:
10
+ '''Mixin class for steps that consume a unified input_map.
11
+
12
+ The input_map maps argument names to either a state/config key (str) or a fixed value (Val).
13
+ Resolution semantics:
14
+ 1. For str specs: read from state first; if missing, fall back to config["configurable"].
15
+ 2. For Val specs: use the literal value.
16
+
17
+ Attributes:
18
+ input_map (dict[str, str | Val]): Mapping of argument names to either a state/config key (str)
19
+ or a fixed value (Val).
20
+ '''
21
+ input_map: Incomplete
22
+ def __init__(self, input_map: dict[str, str | Val] | list[str | dict[str, str] | dict[str, Val]] | None = None) -> None:
23
+ '''Initialize with a unified input_map.
24
+
25
+ Args:
26
+ input_map (dict[str, str | Val] | list[str | dict[str, str] | dict[str, Val]] | None):
27
+ Mapping of argument names to either a state/config key (str) or a fixed value (Val).
28
+ Also accepts a list form for ergonomics:
29
+ 1. str: identity mapping ("key" -> {"key": "key"})
30
+ 2. dict[str, str]: explicit mapping to state/config key
31
+ 3. dict[str, Val]: fixed/literal value
32
+ Defaults to None, in which case an empty mapping is used.
33
+ '''
34
+ @classmethod
35
+ def from_legacy_map(cls, input_state_map: dict[str, str] | None, runtime_config_map: dict[str, str] | None, fixed_args: dict[str, Any] | None) -> dict[str, str | Val]:
36
+ """Synthesize an input_map from state/config mappings and fixed args.
37
+
38
+ Precedence: fixed_args > runtime_config_map > input_state_map.
39
+
40
+ Args:
41
+ input_state_map (dict[str, str] | None, optional): Mapping of argument names to state keys.
42
+ Defaults to None, in which case an empty mapping is used.
43
+ runtime_config_map (dict[str, str] | None, optional): Mapping of argument names to runtime configuration
44
+ keys. Defaults to None, in which case an empty mapping is used.
45
+ fixed_args (dict[str, Any] | None, optional): Mapping of argument names to fixed values.
46
+ Defaults to None, in which case an empty mapping is used.
47
+
48
+ Returns:
49
+ dict[str, str | Val]: The synthesized input_map.
50
+ """
@@ -0,0 +1,12 @@
1
+ from gllm_pipeline.alias import PipelineState as PipelineState
2
+ from typing import Any
3
+
4
+ def shallow_dump(state: PipelineState) -> dict[str, Any]:
5
+ """Convert Pydantic model to dict while preserving nested Pydantic objects.
6
+
7
+ Args:
8
+ state (PipelineState): The state to convert.
9
+
10
+ Returns:
11
+ dict[str, Any]: The state as a dictionary with preserved nested Pydantic objects.
12
+ """
@@ -0,0 +1,29 @@
1
+ from gllm_pipeline.steps.pipeline_step import BasePipelineStep as BasePipelineStep
2
+
3
+ MERMAID_HEADER: str
4
+
5
+ def extract_step_diagrams(steps: list['BasePipelineStep']) -> list[str]:
6
+ """Extract and format Mermaid diagram content from a list of steps.
7
+
8
+ This function is used to extract the diagram content from each step in the pipeline.
9
+ It will remove the mermaid header and return the remaining lines.
10
+
11
+ Args:
12
+ steps (list[BasePipelineStep]): A list of pipeline steps that may have get_mermaid_diagram methods
13
+
14
+ Returns:
15
+ list[str]: A list of Mermaid diagram lines from the steps
16
+ """
17
+ def combine_mermaid_diagrams(base_diagram: str, step_diagrams: str) -> str:
18
+ """Combine a base Mermaid diagram with step diagrams if they exist.
19
+
20
+ This is a common utility for Pipeline and various step classes that follow the same
21
+ pattern of combining a base diagram with nested step diagrams.
22
+
23
+ Args:
24
+ base_diagram (str): The base Mermaid diagram representation.
25
+ step_diagrams (str): The combined step diagrams content.
26
+
27
+ Returns:
28
+ str: The complete Mermaid diagram representation.
29
+ """
@@ -0,0 +1,25 @@
1
+ from gllm_core.utils.retry import RetryConfig as RetryConfig
2
+ from langgraph.types import RetryPolicy
3
+
4
+ def retry_config_to_langgraph_policy(retry_config: RetryConfig | None) -> RetryPolicy | None:
5
+ """Convert RetryConfig to LangGraph's RetryPolicy.
6
+
7
+ This function maps the GLLM Core's RetryConfig parameters to LangGraph's RetryPolicy format.
8
+
9
+ Args:
10
+ retry_config (RetryConfig | None, optional): The GLLM Core's retry configuration.
11
+ Defaults to None, in which case no retry config is applied.
12
+
13
+ Returns:
14
+ RetryPolicy | None: The equivalent LangGraph retry policy, or None if retry_config is None.
15
+
16
+ Note:
17
+ The conversion maps the following parameters:
18
+ 1. max_retries + 1 -> max_attempts (LangGraph counts the first attempt as 1).
19
+ 2. base_delay -> initial_interval.
20
+ 3. max_delay -> max_interval.
21
+ 4. exponential_base -> backoff_factor (using 2.0 as per SDK validation).
22
+ 5. jitter -> jitter.
23
+ 6. retry_on_exceptions -> retry_on.
24
+ 7. timeout is not directly supported by LangGraph's RetryPolicy.
25
+ """
@@ -0,0 +1,19 @@
1
+ from gllm_pipeline.steps.pipeline_step import BasePipelineStep as BasePipelineStep
2
+ from langgraph.runtime import Runtime as Runtime
3
+ from pydantic import BaseModel as BaseModel
4
+ from typing import Any
5
+
6
+ async def execute_sequential_steps(steps: list['BasePipelineStep'], state: dict[str, Any], runtime: Runtime[dict[str, Any] | BaseModel]) -> dict[str, Any] | None:
7
+ """Execute a sequence of steps sequentially and return accumulated state updates.
8
+
9
+ Each step will receive the updated state from the previous step. In the end, all state updates
10
+ will be merged into a single update dictionary.
11
+
12
+ Args:
13
+ steps (list[BasePipelineStep]): The steps to run sequentially.
14
+ state (dict[str, Any]): The initial state to pass to the first step.
15
+ runtime (Runtime[dict[str, Any] | BaseModel]): Runtime information for step execution.
16
+
17
+ Returns:
18
+ dict[str, Any] | None: The accumulated state updates from all steps, or None if no updates.
19
+ """
@@ -0,0 +1 @@
1
+ *
Binary file
gllm_pipeline.pyi ADDED
@@ -0,0 +1,86 @@
1
+ # This file was generated by Nuitka
2
+
3
+ # Stubs included by default
4
+
5
+
6
+ __name__ = ...
7
+
8
+
9
+
10
+ # Modules used internally, to allow implicit dependencies to be seen:
11
+ import os
12
+ import typing
13
+ import pydantic
14
+ import __future__
15
+ import gllm_core
16
+ import gllm_core.schema
17
+ import gllm_core.utils
18
+ import gllm_core.utils.retry
19
+ import gllm_datastore
20
+ import gllm_datastore.cache
21
+ import gllm_datastore.cache.cache
22
+ import asyncio
23
+ import copy
24
+ import gllm_core.utils.imports
25
+ import gllm_core.utils.logger_manager
26
+ import gllm_inference
27
+ import gllm_inference.exceptions
28
+ import langgraph
29
+ import langgraph.graph
30
+ import langgraph.graph.state
31
+ import gllm_pipeline.exclusions.ExclusionManager
32
+ import gllm_pipeline.pipeline.composer.Composer
33
+ import gllm_core.event
34
+ import gllm_core.event.event_emitter
35
+ import gllm_pipeline.router.aurelio_semantic_router.AurelioSemanticRouter
36
+ import logging
37
+ import semantic_router
38
+ import semantic_router.encoders
39
+ import semantic_router.encoders.base
40
+ import semantic_router.routers
41
+ import semantic_router.schema
42
+ import semantic_router.route
43
+ import concurrent
44
+ import concurrent.futures
45
+ import gllm_inference.em_invoker
46
+ import gllm_inference.em_invoker.em_invoker
47
+ import langchain_core
48
+ import langchain_core.embeddings
49
+ import semantic_router.encoders.huggingface
50
+ import inspect
51
+ import abc
52
+ import numpy
53
+ import semantic_router.index
54
+ import azure
55
+ import azure.core
56
+ import azure.core.credentials
57
+ import azure.search
58
+ import azure.search.documents
59
+ import azure.search.documents._generated
60
+ import azure.search.documents._generated.models
61
+ import json
62
+ import concurrent.futures.ThreadPoolExecutor
63
+ import pathlib
64
+ import gllm_core.schema.chunk
65
+ import gllm_datastore.vector_data_store
66
+ import gllm_datastore.vector_data_store.vector_data_store
67
+ import gllm_inference.request_processor
68
+ import gllm_inference.schema
69
+ import gllm_inference.builder
70
+ import gllm_inference.lm_invoker
71
+ import gllm_inference.lm_invoker.lm_invoker
72
+ import gllm_inference.output_parser
73
+ import gllm_inference.prompt_builder
74
+ import re
75
+ import gllm_core.utils.similarity
76
+ import base64
77
+ import random
78
+ import string
79
+ import functools
80
+ import gllm_core.utils.analyzer
81
+ import langgraph.runtime
82
+ import langgraph.types
83
+ import dataclasses
84
+ import gllm_core.event.messenger
85
+ import gllm_pipeline.steps.step_error_handler.RaiseStepErrorHandler
86
+ import traceback
@@ -0,0 +1,105 @@
1
+ Metadata-Version: 2.2
2
+ Name: gllm-pipeline-binary
3
+ Version: 0.4.21
4
+ Summary: A library containing components related to Gen AI applications pipeline orchestration.
5
+ Author-email: Dimitrij Ray <dimitrij.ray@gdplabs.id>, Henry Wicaksono <henry.wicaksono@gdplabs.id>, Kadek Denaya <kadek.d.r.diana@gdplabs.id>
6
+ Requires-Python: <3.13,>=3.11
7
+ Description-Content-Type: text/markdown
8
+ Requires-Dist: poetry<2.2.0,>=2.1.3
9
+ Requires-Dist: pydantic<2.12.0,>=2.11.7
10
+ Requires-Dist: gllm-core-binary<0.4.0,>=0.3.0
11
+ Requires-Dist: gllm-inference-binary<0.6.0,>=0.5.0
12
+ Requires-Dist: aiohttp<3.13.0,>=3.12.14
13
+ Requires-Dist: langgraph<0.7.0,>=0.6.0
14
+ Provides-Extra: dev
15
+ Requires-Dist: coverage<7.5.0,>=7.4.4; extra == "dev"
16
+ Requires-Dist: mypy<1.16.0,>=1.15.0; extra == "dev"
17
+ Requires-Dist: pre-commit<3.8.0,>=3.7.0; extra == "dev"
18
+ Requires-Dist: pytest<8.2.0,>=8.1.1; extra == "dev"
19
+ Requires-Dist: pytest-asyncio<0.24.0,>=0.23.6; extra == "dev"
20
+ Requires-Dist: pytest-cov<5.1.0,>=5.0.0; extra == "dev"
21
+ Requires-Dist: ruff<0.7.0,>=0.6.7; extra == "dev"
22
+ Provides-Extra: cache
23
+ Requires-Dist: gllm-datastore-binary[chroma]<0.6.0,>=0.5.0; extra == "cache"
24
+ Provides-Extra: multimodal-router
25
+ Requires-Dist: gllm-inference-binary[google]<0.6.0,>=0.5.0; extra == "multimodal-router"
26
+ Provides-Extra: semantic-router
27
+ Requires-Dist: azure-search-documents<12.0.0,>=11.5.1; extra == "semantic-router"
28
+ Requires-Dist: semantic-router<0.2.0,>=0.1.0; extra == "semantic-router"
29
+
30
+ # GLLM Pipeline
31
+
32
+ ## Description
33
+
34
+ A library containing components related to Gen AI applications pipeline orchestration.
35
+
36
+ ## Installation
37
+
38
+ ### Prerequisites
39
+ 1. Python 3.11+ - [Install here](https://www.python.org/downloads/)
40
+ 2. Pip (if using Pip) - [Install here](https://pip.pypa.io/en/stable/installation/)
41
+ 3. Poetry 2.1.4+ - [Install here](https://python-poetry.org/docs/#installation)
42
+ 4. Git (if using Git) - [Install here](https://git-scm.com/downloads)
43
+ 5. gcloud CLI (for authentication) - [Install here](https://cloud.google.com/sdk/docs/install)
44
+ 6. For git installation, access to the [GDP Labs SDK github repository](https://github.com/GDP-ADMIN/gl-sdk)
45
+
46
+ ### 1. Installation from Artifact Registry
47
+ Choose one of the following methods to install the package:
48
+
49
+ #### Using pip
50
+ ```bash
51
+ pip install gllm-pipeline-binary
52
+ ```
53
+
54
+ #### Using Poetry
55
+ ```bash
56
+ poetry add gllm-pipeline-binary
57
+ ```
58
+
59
+ ### 2. Development Installation (Git)
60
+ For development purposes, you can install directly from the Git repository:
61
+ ```bash
62
+ poetry add "git+ssh://git@github.com/GDP-ADMIN/gen-ai-internal.git#subdirectory=libs/gllm-pipeline"
63
+ ```
64
+
65
+ ## Local Development Setup
66
+
67
+ ### Quick Setup (Recommended)
68
+ For local development with editable gllm packages, use the provided Makefile:
69
+
70
+ ```bash
71
+ # Complete setup: installs Poetry, configures auth, installs packages, sets up pre-commit
72
+ make setup
73
+ ```
74
+
75
+ The following are the available Makefile targets:
76
+
77
+ 1. `make setup` - Complete development setup (recommended for new developers)
78
+ 2. `make install-poetry` - Install or upgrade Poetry to the latest version
79
+ 3. `make auth` - Configure authentication for internal repositories
80
+ 4. `make install` - Install all dependencies
81
+ 5. `make install-pre-commit` - Set up pre-commit hooks
82
+ 6. `make update` - Update dependencies
83
+
84
+ ### Manual Development Setup (Legacy)
85
+ If you prefer to manage dependencies manually:
86
+
87
+ 1. Go to root folder of `gllm-pipeline` module, e.g. `cd libs/gllm-pipeline`.
88
+ 2. Run `poetry shell` to create a virtual environment.
89
+ 3. Run `poetry lock` to create a lock file if you haven't done it yet.
90
+ 4. Run `poetry install` to install the `gllm-pipeline` requirements for the first time.
91
+ 5. Run `poetry update` if you update any dependency module version at `pyproject.toml`.
92
+
93
+
94
+ ## Contributing
95
+ Please refer to this [Python Style Guide](https://docs.google.com/document/d/1uRggCrHnVfDPBnG641FyQBwUwLoFw0kTzNqRm92vUwM/edit?usp=sharing)
96
+ to get information about code style, documentation standard, and SCA that you need to use when contributing to this project
97
+
98
+ ### Getting Started with Development
99
+ 1. Clone the repository and navigate to the gllm-pipeline directory
100
+ 2. Run `make setup` to set up your development environment
101
+ 3. Run `which python` to get the path to be referenced at Visual Studio Code interpreter path (`Ctrl`+`Shift`+`P` or `Cmd`+`Shift`+`P`)
102
+ 4. Try running the unit test to see if it's working:
103
+ ```bash
104
+ poetry run pytest -s tests/unit_tests/
105
+ ```
@@ -0,0 +1,77 @@
1
+ gllm_pipeline.cpython-312-darwin.so,sha256=RaZavcI7DAy5Hv4rLlnOnKJ0zJvZRB_Q6KMuusEwwsw,2701616
2
+ gllm_pipeline.pyi,sha256=QRQhvO2Qq-xIEm7IGhaJ7ZELWzla_t4KiOV9MtH6zSQ,2294
3
+ gllm_pipeline/__init__.pyi,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
4
+ gllm_pipeline/alias.pyi,sha256=6H7P0r5NVY8FZmwplWfP6h_xnCrb4TcUDuXUAcHUt9g,230
5
+ gllm_pipeline/types.pyi,sha256=uLdPigcnsazts1CRBMGpVZVfzWpqZ_HxRnq5nbjz7IY,231
6
+ gllm_pipeline/exclusions/__init__.pyi,sha256=gNcngDLTLWCWsxpZt0c8w0ZFGT_4zWAwD9FxaTvoSBs,220
7
+ gllm_pipeline/exclusions/exclusion_manager.pyi,sha256=nhhZ7TFJ3pKSDmVKNL3OaMKG1rCekWQeC_yOagTiTVQ,2886
8
+ gllm_pipeline/exclusions/exclusion_set.pyi,sha256=rXS0XfJxksXhzUSUOrvsEOy9K0Le1x0v5TUey4Mjk1g,1639
9
+ gllm_pipeline/pipeline/__init__.pyi,sha256=9Gf0OC71fnSsfRm6PPYSpzB7JSpIL__xrmw6zm3UN9A,164
10
+ gllm_pipeline/pipeline/pipeline.pyi,sha256=MxqxpQPa-c1TqWXde2-TB7h_oP6VjQ9lmg5TMQlwKsI,14371
11
+ gllm_pipeline/pipeline/states.pyi,sha256=563oqEw5nOw-p2WpEEvT8wBZzTSUjF0QENWMKUtDcxg,6325
12
+ gllm_pipeline/pipeline/composer/__init__.pyi,sha256=PDiVeDcWArktCaLMIx67MctFQDEPeSwWINzQMC6zJf0,658
13
+ gllm_pipeline/pipeline/composer/composer.pyi,sha256=BeIAv0D7o_MlnuYhXrPy7cZz91YDwSeeDlVTzYF82uU,26347
14
+ gllm_pipeline/pipeline/composer/guard_composer.pyi,sha256=1SmFjd0tVkeG48QX-mYs2Q8UZLheQix0bDeYthP3ZT0,3277
15
+ gllm_pipeline/pipeline/composer/if_else_composer.pyi,sha256=Nx7u56xlNkPzzEPGMBuUVNTXhV5eiteRLaxWQU3_pyk,3139
16
+ gllm_pipeline/pipeline/composer/parallel_composer.pyi,sha256=buEStcl6Vypgbq5mdZ3xqryWwpe7_Nh3UmhN0skoq3E,2546
17
+ gllm_pipeline/pipeline/composer/switch_composer.pyi,sha256=dZGNTVb41ltTGQiqIZUyqkpCiNrzGpB0PgN7J8tWSA0,3089
18
+ gllm_pipeline/pipeline/composer/toggle_composer.pyi,sha256=WhI7DSe4ZOyV9STRHJh7w37NsvsrD6xoGjk1RfMQgwg,2787
19
+ gllm_pipeline/router/__init__.pyi,sha256=tH9Jcgm8OiP6EK0iIiBM4G9ckfz5Nje-aWQ-XOvnIgE,472
20
+ gllm_pipeline/router/lm_based_router.pyi,sha256=vTXLiIJNBLZBNb6Xv1ezpFH4JqoMdbkSwbF48_bso5E,3109
21
+ gllm_pipeline/router/router.pyi,sha256=S4Dcp88UGNOyX-gVZWmAP1RIW-efwBfYNyydOQzCjRg,1991
22
+ gllm_pipeline/router/rule_based_router.pyi,sha256=v_3v55gVFF3-CBrRLdZhVpAc-G4CrjHxKlHtENQxwKo,4407
23
+ gllm_pipeline/router/similarity_based_router.pyi,sha256=0Aig4flcWf_kVXQebDgw4b7s16G38puEypf7dzL3aP4,3894
24
+ gllm_pipeline/router/utils.pyi,sha256=O-Ha_3ZMilp1QvRoncI-9qZ1Kt3zjPrSGJJ4YtAEi6o,1178
25
+ gllm_pipeline/router/aurelio_semantic_router/__init__.pyi,sha256=_FhZzxawotH6RkDxl0ghdGjNRWCgYwgjd3TS3NU8g7Q,165
26
+ gllm_pipeline/router/aurelio_semantic_router/aurelio_semantic_router.pyi,sha256=aoPe7tOoOtHZccI-50uu8RN6-juCzO5tZ8Dtzzg9ffw,4886
27
+ gllm_pipeline/router/aurelio_semantic_router/bytes_compat_route.pyi,sha256=v1E4a3tQtm9lp4QXCQaM-pFJ6PIv8mznLmElMPNnPt0,1923
28
+ gllm_pipeline/router/aurelio_semantic_router/encoders/__init__.pyi,sha256=S8UYtu00h0k9OpJhnvKTkhAkfCLXffIQP62a5wozFCA,442
29
+ gllm_pipeline/router/aurelio_semantic_router/encoders/em_invoker_encoder.pyi,sha256=Vgafi1Ox3T_ndskXGUcCCqQGeECW5tJ-VCwRM3vFnIo,2053
30
+ gllm_pipeline/router/aurelio_semantic_router/encoders/langchain_encoder.pyi,sha256=Z3NQ1a_rMG3PrbPxsWnqrjwXUd3s2BJgObDOVHgzXQU,2212
31
+ gllm_pipeline/router/aurelio_semantic_router/encoders/tei_encoder.pyi,sha256=0xri8mDzZab7CTa3bB6yPeNO5Amrq__6zuW9nNibHhs,2152
32
+ gllm_pipeline/router/aurelio_semantic_router/index/__init__.pyi,sha256=vOR33o3LV5nCOWHrAtAfWY01k438OtYgM108Mc1dWyI,357
33
+ gllm_pipeline/router/aurelio_semantic_router/index/aurelio_index.pyi,sha256=1cWybjcGKWvQiI4txkD9_DPNFADIZH-xDPNXqWisuLs,3321
34
+ gllm_pipeline/router/aurelio_semantic_router/index/azure_ai_search_aurelio_index.pyi,sha256=3GFaf18mkMaQyJK5HAWNOVi2t_X0fJaF8J8puOJ0ZjQ,3887
35
+ gllm_pipeline/router/aurelio_semantic_router/index/vector_store_adapter_index.pyi,sha256=ybk-_uW0EXnlVTCjJ6pmIdVaIrEi-JPE8_UUTbRTOD0,5849
36
+ gllm_pipeline/router/preset/__init__.pyi,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
37
+ gllm_pipeline/router/preset/preset_loader.pyi,sha256=oYO8yZnzFMpgICPm1SbYNjlU_eFB0JTZmC_JKpvyXdA,979
38
+ gllm_pipeline/router/preset/aurelio/__init__.pyi,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
39
+ gllm_pipeline/router/preset/aurelio/router_image_domain_specific.pyi,sha256=GN4GrPW31B4qbi9yXuxnIG5gvcZtG4BuPmu-iIYsnXo,1072
40
+ gllm_pipeline/router/preset/lm_based/__init__.pyi,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
41
+ gllm_pipeline/router/preset/lm_based/router_image_domain_specific.pyi,sha256=iFP6sjItGq-GArqMT_1mPbSsld7w5wdlITWVAx5dh4Y,641
42
+ gllm_pipeline/steps/__init__.pyi,sha256=YboMV28iDi_28JIHCGcsqKJoLXyXaOiLdDVSVNQ2d2E,1950
43
+ gllm_pipeline/steps/_func.pyi,sha256=sy9wRxM_fTz2ogyZr1WYOZfx8Qa6EGJRvw5mUsbbKAg,59885
44
+ gllm_pipeline/steps/branching_step.pyi,sha256=02JRs4w8wgUqRxGFzldlTUQS5-Ap4DqVeQoFMXyIrjc,1017
45
+ gllm_pipeline/steps/component_step.pyi,sha256=a6_KJHDLpqEcq86SqmPniS7XP0u-KUo9bE3eolL650A,5465
46
+ gllm_pipeline/steps/composite_step.pyi,sha256=gYLQgwErdTqKbmxo2yrtqcRbmaIKnLY65l0UjHunwyo,3479
47
+ gllm_pipeline/steps/conditional_step.pyi,sha256=njBVlDF5x6zQCg7MTk8fyHd8j1n3k3A2PBIHSYhTXdA,10028
48
+ gllm_pipeline/steps/guard_step.pyi,sha256=QJVNn-pZdBObYQ3JrW-BYWXJPVGLTprSngW8cXZTm4E,4708
49
+ gllm_pipeline/steps/log_step.pyi,sha256=_LH0TL1p7bG6FGNL8FYAauuLAU_wElkLfxDEhoQg5sQ,3047
50
+ gllm_pipeline/steps/map_reduce_step.pyi,sha256=dYpv13UxoAOFqqfTVG6Uzp2vmcEuUdal9G9uUyfL5I8,5942
51
+ gllm_pipeline/steps/no_op_step.pyi,sha256=mvOH7rzJHHTt5-GTZ5Sznu1bkHkvpwgvllKH88BGTns,1339
52
+ gllm_pipeline/steps/parallel_step.pyi,sha256=jxvNGXpYg9B85MjD4Z2M_r6G4GAdYNslEkdxKpHF5iA,8254
53
+ gllm_pipeline/steps/pipeline_step.pyi,sha256=cuj_Gp1SDrm-qwmXQDr3mpwH8YMsXm-wLyr_mSciBVM,10982
54
+ gllm_pipeline/steps/state_operator_step.pyi,sha256=dEiORgsHOm-fnjRHVr7Pp3g2ORne4mq0uTPcHC6VCgo,5036
55
+ gllm_pipeline/steps/subgraph_step.pyi,sha256=jcjIe-PkBy7j5IksT4kRV4qP2PiviS4ERDaivHOYEO0,5735
56
+ gllm_pipeline/steps/terminator_step.pyi,sha256=kSfRj0iWqduyoAJZ3ZF43Y6sWyRGZzBaYlOL3zfjSEU,2457
57
+ gllm_pipeline/steps/step_error_handler/__init__.pyi,sha256=MZRqn696hQ9roxwbMJZEb8Dwa9BTTL1fPceudAqX2mw,612
58
+ gllm_pipeline/steps/step_error_handler/empty_step_error_handler.pyi,sha256=Hj2L6JT_xf9reZiMVA14Z44tXzOvwX0SvjpMQ_qeKF4,881
59
+ gllm_pipeline/steps/step_error_handler/fallback_step_error_handler.pyi,sha256=RU8Jo-5MGq9SexVGeN9FuFaRzlU81j7oK29dzuFJy1w,1302
60
+ gllm_pipeline/steps/step_error_handler/keep_step_error_handler.pyi,sha256=U_oMjoKXdxWylOEK3hmItS4UVMdCbzEuvmJ2QMrItM8,478
61
+ gllm_pipeline/steps/step_error_handler/raise_step_error_handler.pyi,sha256=8qLhcPfWn0BGLPUlWjMikOAcfFhS8GpnpmB19lM8kxk,483
62
+ gllm_pipeline/steps/step_error_handler/step_error_handler.pyi,sha256=uNGOqRzY_oh7oiXLtYwC-6sKRMLd-cGojJTbsFsTsH0,2059
63
+ gllm_pipeline/utils/__init__.pyi,sha256=dtvJPoSsu4509h_iGKhURuf1sedLPHyoIM2oTToIIyQ,985
64
+ gllm_pipeline/utils/async_utils.pyi,sha256=nV_zGKYiyusRrl1cxfbwDCMUImXRtyod-JjzhchSgB0,878
65
+ gllm_pipeline/utils/copy.pyi,sha256=hhNBr-Y8XBFdw30YViF4UXF3wm6J1UJwZI-jQxjId-E,249
66
+ gllm_pipeline/utils/error_handling.pyi,sha256=AFGGOz8bCdoeIRCo60s1URbqIlABoGvzDDqZhhdYg-Q,2416
67
+ gllm_pipeline/utils/graph.pyi,sha256=42hEldV1-h04UqTaXdgyDbrFnF_Yur6oJ_Nxrz76prM,680
68
+ gllm_pipeline/utils/has_inputs_mixin.pyi,sha256=T1iLxewyCNs6q-w4IQvo0aFnfBS9aVDFayt7aa1sIq4,2585
69
+ gllm_pipeline/utils/input_map.pyi,sha256=iwb9_PpcOnhBmn0wndfs6-45VJkQvidNhdOl0LhIuVE,401
70
+ gllm_pipeline/utils/mermaid.pyi,sha256=RyjVkNrStSG0P2FDNJcnhxoFVgdjwRQuvAuwl4G19qY,1145
71
+ gllm_pipeline/utils/retry_converter.pyi,sha256=uWAEB-90lTQRW7OWuWpqYD9WiOh5TJ22laYzEw5mo-o,1103
72
+ gllm_pipeline/utils/step_execution.pyi,sha256=0hB3HkI-esrASTA_bSMOdcq1u1zMpBNANyR1teYJ6ZE,977
73
+ gllm_pipeline.build/.gitignore,sha256=aEiIwOuxfzdCmLZe4oB1JsBmCUxwG8x-u-HBCV9JT8E,1
74
+ gllm_pipeline_binary-0.4.21.dist-info/METADATA,sha256=QMKxeXZJ_7JnggbL7ARCsriEEvxtEMRVxEvQF9-5gmU,4371
75
+ gllm_pipeline_binary-0.4.21.dist-info/WHEEL,sha256=3_OxJCblxumpvXIF3fzn6AdLwNrZtW8pLLQq8YuAVhY,104
76
+ gllm_pipeline_binary-0.4.21.dist-info/top_level.txt,sha256=C3yeOtoE6ZhuOnBEq_FFc_Rp954IHJBlB6fBgSdAWYI,14
77
+ gllm_pipeline_binary-0.4.21.dist-info/RECORD,,
@@ -0,0 +1,5 @@
1
+ Wheel-Version: 1.0
2
+ Generator: Nuitka (2.6.9)
3
+ Root-Is-Purelib: false
4
+ Tag: cp312-cp312-macosx_13_0_arm64
5
+
@@ -0,0 +1 @@
1
+ gllm_pipeline