File size: 1,700 Bytes
33810f9 |
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 |
# Table of Contents
* [CodeGeneratorAtomicFlow](#CodeGeneratorAtomicFlow)
* [CodeGeneratorAtomicFlow](#CodeGeneratorAtomicFlow.CodeGeneratorAtomicFlow)
* [instantiate\_from\_config](#CodeGeneratorAtomicFlow.CodeGeneratorAtomicFlow.instantiate_from_config)
* [run](#CodeGeneratorAtomicFlow.CodeGeneratorAtomicFlow.run)
* [\_\_init\_\_](#__init__)
<a id="CodeGeneratorAtomicFlow"></a>
# CodeGeneratorAtomicFlow
<a id="CodeGeneratorAtomicFlow.CodeGeneratorAtomicFlow"></a>
## CodeGeneratorAtomicFlow Objects
```python
class CodeGeneratorAtomicFlow(ChatAtomicFlow)
```
This class wraps around the Chat API to generate code from a goal. One thing worth noting is that we need to
make sure the code generator does not write repetitive code that is present in the library, so we need to inject
the function signatures in the library to the system prompts.
*Input Interface Non Initialized*:
- `goal`
- `code_library`
- `memory_files`
*Input Interface Initialized*:
- `goal`
- `code_library`
- `memory_files`
*Output Interface*:
- `code`
- `language_of_code`
<a id="CodeGeneratorAtomicFlow.CodeGeneratorAtomicFlow.instantiate_from_config"></a>
#### instantiate\_from\_config
```python
@classmethod
def instantiate_from_config(cls, config)
```
Instantiate a CodeGeneratorAtomicFlow from a configuration.
**Arguments**:
- `config`: Configuration dictionary.
**Returns**:
Instantiated CodeGeneratorAtomicFlow.
<a id="CodeGeneratorAtomicFlow.CodeGeneratorAtomicFlow.run"></a>
#### run
```python
def run(input_data: Dict[str, Any]) -> Dict[str, Any]
```
Run the flow.
**Arguments**:
- `input_data`: Input data.
**Returns**:
Output data.
<a id="__init__"></a>
# \_\_init\_\_
|