Tachi67's picture
Update README.md
ae92286
|
raw
history blame
1.95 kB

Table of Contents

CodeGeneratorAtomicFlow

CodeGeneratorAtomicFlow Objects

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.

Please also visit https://huggingface.co/aiflows/ChatFlowModule for more parameter explaination.

Input Interface Non Initialized (i.e. input when the chat is first initialized):

  • goal
  • code_library
  • memory_files

Input Interface Initialized (i.e. input when the chat is already initialized, this happens when we are calling the chat again):

  • goal
  • code_library
  • memory_files

Output Interface:

  • code
  • language_of_code

instantiate_from_config

@classmethod
def instantiate_from_config(cls, config)

Instantiate a CodeGeneratorAtomicFlow from a configuration.

Arguments:

  • config: Configuration dictionary.

Returns:

Instantiated CodeGeneratorAtomicFlow.

run

def run(input_data: Dict[str, Any]) -> Dict[str, Any]

Run the flow.

Arguments:

  • input_data: Input data.

Returns:

Output data.

__init__