| # 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\_\_ |
|
|
|
|