gllm-pipeline-binary 0.4.27__cp312-cp312-win_amd64.whl → 0.4.28__cp312-cp312-win_amd64.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.
@@ -202,6 +202,10 @@ class Pipeline:
202
202
  being derived from the pipeline\'s input schema. The pipeline must have an input_type
203
203
  defined to be convertible as a tool.
204
204
 
205
+ If the pipeline has a context_schema defined, the tool will accept a nested
206
+ structure with \'input\' and optional \'context\' keys. Otherwise, it will accept
207
+ flat kwargs matching the input schema (legacy behavior).
208
+
205
209
  Args:
206
210
  description (str | None, optional): Optional description to associate with the tool.
207
211
  Defaults to None, in which case a description will be generated automatically.
@@ -216,20 +220,31 @@ class Pipeline:
216
220
  ```python
217
221
  class InputState(TypedDict):
218
222
  user_query: str
219
- context: str
220
223
 
221
- class OutputState(TypedDict):
222
- result: str
224
+ class ContextSchema(TypedDict):
225
+ session_id: str
223
226
 
227
+ # With context schema
224
228
  pipeline = Pipeline(
225
229
  [retrieval_step, generation_step],
226
230
  input_type=InputState,
227
- output_type=OutputState,
231
+ context_schema=ContextSchema,
228
232
  name="rag_pipeline"
229
233
  )
234
+ tool = pipeline.as_tool()
235
+ result = await tool.invoke(
236
+ input={"user_query": "What is AI?"},
237
+ context={"session_id": "abc123"}
238
+ )
230
239
 
231
- tool = pipeline.as_tool(description="Process user questions")
232
- result = await tool.invoke(user_query="What is AI?", context="")
240
+ # Without context schema (legacy)
241
+ pipeline = Pipeline(
242
+ [retrieval_step, generation_step],
243
+ input_type=InputState,
244
+ name="rag_pipeline"
245
+ )
246
+ tool = pipeline.as_tool()
247
+ result = await tool.invoke(user_query="What is AI?")
233
248
  ```
234
249
  '''
235
250
  def clear(self) -> None:
Binary file
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.2
2
2
  Name: gllm-pipeline-binary
3
- Version: 0.4.27
3
+ Version: 0.4.28
4
4
  Summary: A library containing components related to Gen AI applications pipeline orchestration.
5
5
  Author-email: Dimitrij Ray <dimitrij.ray@gdplabs.id>, Henry Wicaksono <henry.wicaksono@gdplabs.id>, Kadek Denaya <kadek.d.r.diana@gdplabs.id>
6
6
  Requires-Python: <3.13,>=3.11
@@ -1,4 +1,4 @@
1
- gllm_pipeline.cp312-win_amd64.pyd,sha256=pCnlJ1gMLrU8F4X-PSk3X7TUrExzivjZOAW00YqXwpY,2192384
1
+ gllm_pipeline.cp312-win_amd64.pyd,sha256=n9hMmUqaMnu1dPi4gKpN06Amqz70g4osTq55ZEc8GE0,2198528
2
2
  gllm_pipeline.pyi,sha256=MD-D3Elp4GWlKPM1ms2pMGJRhtYf1bI84rYAjJSPEbM,2378
3
3
  gllm_pipeline/__init__.pyi,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
4
4
  gllm_pipeline/alias.pyi,sha256=FbALRYZpDlmQMsKNUvgCi6ji11PrEtNo2kgzbt0iT7g,237
@@ -7,7 +7,7 @@ gllm_pipeline/exclusions/__init__.pyi,sha256=_LwIlqmH4Iiksn7p09d2vZG4Ek8CdKC8UcD
7
7
  gllm_pipeline/exclusions/exclusion_manager.pyi,sha256=DzoL-2KeTRmFgJEo8rzYViFYKbzZVTZGJmKvzaoTC0M,2960
8
8
  gllm_pipeline/exclusions/exclusion_set.pyi,sha256=11XTt6IfkHpzomcNybA78SfWlp752Z3AGhXfm2rL0Fk,1685
9
9
  gllm_pipeline/pipeline/__init__.pyi,sha256=1IKGdMvmLWEiOOmAKFNUPm-gdw13zrnU1gs7tDNzgEU,168
10
- gllm_pipeline/pipeline/pipeline.pyi,sha256=CgP179RgbwtIsz_U0cMi3jdwbVOBz-D4sIKjoLkV55g,16504
10
+ gllm_pipeline/pipeline/pipeline.pyi,sha256=Df7oqKBOHRPgB4sU61m1t1kQccRQyAHLRjoptx5DKx8,17140
11
11
  gllm_pipeline/pipeline/states.pyi,sha256=NuWs7-Q6gGIHV32o-conwTtKXrbd0FpKE1d8Hg4OAt0,6459
12
12
  gllm_pipeline/pipeline/composer/__init__.pyi,sha256=-hcOUQgpTRt1QjQfRurTf-UApFnTrhilx6vN-gYd5J0,666
13
13
  gllm_pipeline/pipeline/composer/composer.pyi,sha256=7h7EhEA-hex6w36Is6uGTz9OBUbmq6C0SdkeBeLFcAI,28715
@@ -72,7 +72,7 @@ gllm_pipeline/utils/retry_converter.pyi,sha256=JPUuaGzKpVLshrbhX9rQHYl5XmC9GDa59
72
72
  gllm_pipeline/utils/step_execution.pyi,sha256=3o28tiCHR8t-6Vk3Poz91V-CLdYrdhvJblPW9AoOK-c,996
73
73
  gllm_pipeline/utils/typing_compat.pyi,sha256=V4812i25ncSqZ0o_30lUX65tU07bWEs4LIpdLPt2ngg,116
74
74
  gllm_pipeline.build/.gitignore,sha256=aEiIwOuxfzdCmLZe4oB1JsBmCUxwG8x-u-HBCV9JT8E,1
75
- gllm_pipeline_binary-0.4.27.dist-info/METADATA,sha256=LjXErCA09r8mWb5OsfQj74hRUPw1T1941Iv9DkNzpsw,4524
76
- gllm_pipeline_binary-0.4.27.dist-info/WHEEL,sha256=x5rgv--I0NI0IT1Lh9tN1VG2cI637p3deednwYLKnxc,96
77
- gllm_pipeline_binary-0.4.27.dist-info/top_level.txt,sha256=C3yeOtoE6ZhuOnBEq_FFc_Rp954IHJBlB6fBgSdAWYI,14
78
- gllm_pipeline_binary-0.4.27.dist-info/RECORD,,
75
+ gllm_pipeline_binary-0.4.28.dist-info/METADATA,sha256=i3yyRbcrhX8P1oeTXzZGHVkWRebYmWArGyTckuFyDmI,4524
76
+ gllm_pipeline_binary-0.4.28.dist-info/WHEEL,sha256=x5rgv--I0NI0IT1Lh9tN1VG2cI637p3deednwYLKnxc,96
77
+ gllm_pipeline_binary-0.4.28.dist-info/top_level.txt,sha256=C3yeOtoE6ZhuOnBEq_FFc_Rp954IHJBlB6fBgSdAWYI,14
78
+ gllm_pipeline_binary-0.4.28.dist-info/RECORD,,