1414time and automatically assigned readable names based on the returned objects.
1515"""
1616
17- from collections .abc import Callable , Sequence
17+ from collections .abc import Callable , Iterable , Sequence
1818from dataclasses import dataclass , field
1919from typing import Any , NamedTuple , TypeVar
2020
@@ -143,14 +143,17 @@ class LLMContextNode(Node):
143143 ```
144144 """
145145
146- def __init__ (
146+ def __init__ ( # noqa: PLR0913
147147 self ,
148148 * ,
149149 outputs : str ,
150150 llm : str ,
151151 prompts : list [str ],
152152 tools : list [_ToolConfig ] | None = None ,
153153 name : str | None = None ,
154+ tags : str | Iterable [str ] | None = None ,
155+ confirms : str | list [str ] | None = None ,
156+ namespace : str | None = None ,
154157 ):
155158 """Create an LLMContextNode.
156159
@@ -160,6 +163,10 @@ def __init__(
160163 prompts: List of dataset names containing prompt content.
161164 tools: Optional list of tool configurations created via `tool(...)`.
162165 name: Optional node name; also used as the logical context identifier.
166+ tags: Optional set of tags to be applied to the node.
167+ confirms: Optional name or the list of the names of the datasets
168+ that should be confirmed.
169+ namespace: Optional node namespace.
163170 """
164171 inputs = {"llm" : llm }
165172
@@ -201,18 +208,27 @@ def construct_context(llm: object, **kwargs: dict[str, Any]) -> LLMContext:
201208
202209 # call the Node constructor with the func, inputs, outputs, name
203210 super ().__init__ (
204- func = construct_context , inputs = inputs , outputs = outputs , name = name
211+ func = construct_context ,
212+ inputs = inputs ,
213+ outputs = outputs ,
214+ name = name ,
215+ tags = tags ,
216+ confirms = confirms ,
217+ namespace = namespace ,
205218 )
206219
207220
208221@experimental
209- def llm_context_node (
222+ def llm_context_node ( # noqa: PLR0913
210223 * ,
211224 outputs : str ,
212225 llm : str ,
213226 prompts : list [str ],
214227 tools : list [_ToolConfig ] | None = None ,
215228 name : str | None = None ,
229+ tags : str | Iterable [str ] | None = None ,
230+ confirms : str | list [str ] | None = None ,
231+ namespace : str | None = None ,
216232) -> Node :
217233 """
218234 !!! warning "Experimental"
@@ -229,7 +245,12 @@ def llm_context_node(
229245 prompts: List of dataset names containing prompt content.
230246 tools: Optional list of tool configurations created via `tool(...)`.
231247 Each tool declares the Kedro inputs required to construct it.
232- name: Optional name for the node and for the created context.
248+ name: Optional node name; also used as the logical context identifier.
249+ tags: Optional set of tags to be applied to the node.
250+ confirms: Optional name or the list of the names of the datasets
251+ that should be confirmed.
252+ namespace: Optional node namespace.
253+
233254
234255 Returns:
235256 A Kedro Node that loads all declared datasets, instantiates tools,
@@ -256,4 +277,7 @@ def llm_context_node(
256277 prompts = prompts ,
257278 tools = tools ,
258279 name = name ,
280+ tags = tags ,
281+ confirms = confirms ,
282+ namespace = namespace ,
259283 )
0 commit comments