Skip to content

Commit 87f5100

Browse files
committed
Add chaining.py
1 parent 684cf2a commit 87f5100

1 file changed

Lines changed: 14 additions & 0 deletions

File tree

core/chaining.py

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
from typing import Any, Dict
2+
3+
4+
class CapsuleChain:
5+
"""
6+
v0.1 Capsule Chaining:
7+
Passes output of one capsule into the next capsule's inputs.
8+
"""
9+
10+
@staticmethod
11+
def merge_inputs(original: Dict[str, Any], new_output: Dict[str, Any]) -> Dict[str, Any]:
12+
merged = original.copy()
13+
merged.update(new_output)
14+
return merged

0 commit comments

Comments
 (0)