executor
Class info¶
Classes¶
Name | Children | Inherits |
---|---|---|
ExecutionError llmling_agent.running.executor Raised when function execution fails. |
🛈 DocStrings¶
Function execution management.
ExecutionError
¶
Bases: Exception
Raised when function execution fails.
Source code in src/llmling_agent/running/executor.py
26 27 |
|
discover_functions
¶
discover_functions(path: str | PathLike[str]) -> list[NodeFunction]
Find all node functions in a module.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
path
|
str | PathLike[str]
|
Path to Python module file |
required |
Returns:
Type | Description |
---|---|
list[NodeFunction]
|
List of discovered node functions |
Raises:
Type | Description |
---|---|
ImportError
|
If module cannot be imported |
ValueError
|
If path is invalid |
Source code in src/llmling_agent/running/executor.py
45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 |
|
execute_functions
async
¶
execute_functions(
functions: list[NodeFunction],
pool: AgentPool,
inputs: dict[str, Any] | None = None,
parallel: bool = False,
) -> dict[str, Any]
Execute discovered functions in the right order.
Source code in src/llmling_agent/running/executor.py
243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 |
|
execute_single
async
¶
execute_single(
func: NodeFunction,
pool: AgentPool,
available_results: dict[str, Any],
inputs: dict[str, Any] | None = None,
) -> tuple[str, Any]
Execute a single function.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
func
|
NodeFunction
|
Function to execute |
required |
pool
|
AgentPool
|
Agent pool for injection |
required |
available_results
|
dict[str, Any]
|
Results from previous functions |
required |
inputs
|
dict[str, Any] | None
|
Optional input overrides |
None
|
Returns:
Type | Description |
---|---|
tuple[str, Any]
|
Tuple of (function name, result) |
Raises:
Type | Description |
---|---|
ExecutionError
|
If execution fails |
Source code in src/llmling_agent/running/executor.py
151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 |
|