File size: 2,193 Bytes
67ebb93
 
bf33d37
 
67ebb93
 
bf33d37
 
 
67ebb93
 
bf33d37
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
67ebb93
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
bf33d37
67ebb93
 
 
 
bf33d37
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
67ebb93
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
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
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
# Table of Contents

* [example\_library](#example_library)
  * [add\_two\_numbers](#example_library.add_two_numbers)
* [MemoryReadingAtomicFlow](#MemoryReadingAtomicFlow)
  * [MemoryReadingAtomicFlow](#MemoryReadingAtomicFlow.MemoryReadingAtomicFlow)
    * [\_\_init\_\_](#MemoryReadingAtomicFlow.MemoryReadingAtomicFlow.__init__)
    * [run](#MemoryReadingAtomicFlow.MemoryReadingAtomicFlow.run)
* [run](#run)
* [\_\_init\_\_](#__init__)

<a id="example_library"></a>

# example\_library

<a id="example_library.add_two_numbers"></a>

#### add\_two\_numbers

```python
def add_two_numbers(a, b)
```

Add two numbers together and return the result

**Arguments**:

- `a`: first number
- `b`: second number

**Returns**:

sum of a and b

<a id="MemoryReadingAtomicFlow"></a>

# MemoryReadingAtomicFlow

<a id="MemoryReadingAtomicFlow.MemoryReadingAtomicFlow"></a>

## MemoryReadingAtomicFlow Objects

```python
class MemoryReadingAtomicFlow(AtomicFlow)
```

A flow to read memory from given files.

Any composite flow that uses this flow should have
memory_files: Dict[str, str] which maps memory name to its memory file location in the flow_state

*Input Interface*:
- `memory_files` : name of the Dict which maps the memory name to its file location e.g. {"plan": "examples/JARVIS/plan.txt"}

*Output_Interface*:
- corresponding memory content, for example, `code_library`. There could be multiple memory content returned.

*Configuration Parameters*:
- `input_interface`: input interface of the flow
- `output_interface`: output interface of the flow

<a id="MemoryReadingAtomicFlow.MemoryReadingAtomicFlow.__init__"></a>

#### \_\_init\_\_

```python
def __init__(**kwargs)
```

This is the constructor of the :class:`MemoryReadingAtomicFlow` class.

**Arguments**:

- `kwargs` (`Dict[str, Any]`): additional arguments to pass to the :class:`AtomicFlow` constructor

<a id="MemoryReadingAtomicFlow.MemoryReadingAtomicFlow.run"></a>

#### run

```python
def run(input_data: Dict[str, Any])
```

Run the flow.

**Arguments**:

- `input_data` (`Dict[str, Any]`): the input data

**Returns**:

`Dict[str, Any]`: the output data

<a id="run"></a>

# run

<a id="__init__"></a>

# \_\_init\_\_