Link output from upstream skill to downstream skill input. Args: upstream_skill_id: ID of the upstream skill. downstream_input_key: Key to use in downstream input. output_key: Specific output key to link (e.g., 'return_value', 'stdout').
(self,
upstream_skill_id: str,
downstream_input_key: str,
output_key: str = None)
| 1397 | return asyncio.run(self.execute(executor_type, skill_id, **kwargs)) |
| 1398 | |
| 1399 | def link_skills(self, |
| 1400 | upstream_skill_id: str, |
| 1401 | downstream_input_key: str, |
| 1402 | output_key: str = None) -> Optional[Any]: |
| 1403 | """ |
| 1404 | Link output from upstream skill to downstream skill input. |
| 1405 | |
| 1406 | Args: |
| 1407 | upstream_skill_id: ID of the upstream skill. |
| 1408 | downstream_input_key: Key to use in downstream input. |
| 1409 | output_key: Specific output key to link (e.g., 'return_value', 'stdout'). |
| 1410 | |
| 1411 | Returns: |
| 1412 | The linked value, or None if not found. |
| 1413 | """ |
| 1414 | if upstream_skill_id in self.spec.upstream_outputs: |
| 1415 | output = self.spec.upstream_outputs[upstream_skill_id] |
| 1416 | if output_key: |
| 1417 | return getattr(output, output_key, None) |
| 1418 | return output.return_value or output.stdout |
| 1419 | return None |
| 1420 | |
| 1421 | def get_spec_log(self) -> str: |
| 1422 | """Get the execution spec as markdown string.""" |
no outgoing calls