|
Download README.md from aiflows/HumanStandardInputFlowModule: direct link, hf CLI and curl.
- Browser
- Download file 3.38 kB
-
https://huggingface.co/aiflows/HumanStandardInputFlowModule/resolve/main/README.md
- Command line
-
hf download hf://aiflows/HumanStandardInputFlowModule/README.md
-
curl -L -o README.md https://huggingface.co/aiflows/HumanStandardInputFlowModule/resolve/main/README.md
3.38 kB
| license: mit | |
| # Table of Contents | |
| * [HumanStandardInputFlow](#HumanStandardInputFlow) | |
| * [log](#HumanStandardInputFlow.log) | |
| * [HumanStandardInputFlow](#HumanStandardInputFlow.HumanStandardInputFlow) | |
| * [instantiate\_from\_config](#HumanStandardInputFlow.HumanStandardInputFlow.instantiate_from_config) | |
| * [run](#HumanStandardInputFlow.HumanStandardInputFlow.run) | |
| <a id="HumanStandardInputFlow"></a> | |
| # HumanStandardInputFlow | |
| <a id="HumanStandardInputFlow.log"></a> | |
| #### log | |
| ToDo: Is there a better fix? | |
| <a id="HumanStandardInputFlow.HumanStandardInputFlow"></a> | |
| ## HumanStandardInputFlow Objects | |
| ```python | |
| class HumanStandardInputFlow(AtomicFlow) | |
| ``` | |
| This class implements a HumanStandardInputFlow. It's used to read input from the user/human. Typically used to get feedback from the user/human. | |
| *Configuration Parameters*: | |
| - `name` (str): The name of the flow. | |
| - `description` (str): A description of the flow. This description is used to generate the help message of the flow. | |
| Default: "Reads input from the user's standard input." | |
| - `request_multi_line_input_flag` (bool): If True, the user/human is requested to enter a multi-line input. | |
| If False, the user/human is requested to enter a single-line input. Default: No defaul, this parameter is required. | |
| - `end_of_input_string` (str): The string that the user/human should enter to indicate that the input is finished. | |
| This parameter is only used if "request_multi_line_input_flag" is True. Default: "EOI" | |
| - `query_message_prompt_template` (JinjaPrompt): The prompt template used to generate the query message. By default its of type aiflows.prompt_template.JinjaPrompt. | |
| None of the parameters of the prompt are defined by default and therefore need to be defined if one wants to use the init_human_message_prompt_template. Default parameters are defined in | |
| aiflows.prompt_template.jinja2_prompts.JinjaPrompt. | |
| - The other parameters are inherited from the default configuration of AtomicFlow (see AtomicFlow) | |
| *input_interface*: | |
| - No Input Interface. By default, the input interface expects no input. But if inputs are expected from the query_message_prompt_template,then the input interface should contain the keys specified in the input_variables of the query_message_prompt_template. | |
| *output_interface*: | |
| - `human_input` (str): The message inputed from the user/human. | |
| **Arguments**: | |
| - `query_message_prompt_template` (`JinjaPrompt`): The prompt template used to generate the query message. Expected if the class is instantiated programmatically. | |
| - `\**kwargs` (`Dict[str, Any]`): The keyword arguments passed to the AtomicFlow constructor. Use to create the flow_config. Includes request_multi_line_input_flag, end_of_input_string, input_keys, description of Configuration Parameters. | |
| <a id="HumanStandardInputFlow.HumanStandardInputFlow.instantiate_from_config"></a> | |
| #### instantiate\_from\_config | |
| ```python | |
| @classmethod | |
| def instantiate_from_config(cls, config) | |
| ``` | |
| Instantiates the flow from a config file. | |
| **Arguments**: | |
| - `config` (`Dict[str, Any]`): The configuration of the flow. | |
| <a id="HumanStandardInputFlow.HumanStandardInputFlow.run"></a> | |
| #### run | |
| ```python | |
| def run(input_message: FlowMessage) | |
| ``` | |
| Runs the HumanStandardInputFlow. It's used to read input from the user/human's standard input. | |
| **Arguments**: | |
| - `input_message` (`FlowMessage`): The input message | |