Download OpenAIChatHumanFlowModule.yaml from aiflows/ChatInteractiveFlowModule: direct link, hf CLI and curl.
- Browser
- Download file 1.94 kB
-
https://huggingface.co/aiflows/ChatInteractiveFlowModule/resolve/61753740c76cd045a539d144532ec847ec0e9434/OpenAIChatHumanFlowModule.yaml
- Command line
-
hf download hf://aiflows/ChatInteractiveFlowModule@61753740c76cd045a539d144532ec847ec0e9434/OpenAIChatHumanFlowModule.yaml
-
curl -L -o OpenAIChatHumanFlowModule.yaml https://huggingface.co/aiflows/ChatInteractiveFlowModule/resolve/61753740c76cd045a539d144532ec847ec0e9434/OpenAIChatHumanFlowModule.yaml
1.94 kB
| name: "OpenAIChatInteractiveFlow" | |
| description: "Flow for chatting with an OpenAI Flow and a user providing the input." | |
| max_rounds: null # Run until early exit is detected | |
| input_keys: null # Should be specified by the user | |
| output_keys: null # Should be specified by the user | |
| subflows_config: | |
| Assistant: | |
| _target_: aiflows.OpenAIChatFlowModule.OpenAIChatAtomicFlow.instantiate_from_default_config | |
| model_name: "gpt-4" | |
| User: | |
| _target_: aiflows.HumanStandardInputFlowModule.HumanStandardInputFlow.instantiate_from_default_config | |
| topology: | |
| - goal: "Query the assistant" | |
| ### Input Interface | |
| input_interface: | |
| _target_: flows.interfaces.KeyInterface | |
| additional_transformations: | |
| - _target_: flows.data_transformations.KeyMatchInput | |
| ### Flow Specification | |
| flow: Assistant | |
| reset_every_round: false | |
| ### Output Interface | |
| output_interface: | |
| _target_: flows.interfaces.KeyInterface | |
| additional_transformations: | |
| - _target_: flows.data_transformations.PrintPreviousMessages | |
| - goal: "Ask the user for input" | |
| ### Input Interface | |
| input_interface: | |
| _target_: flows.interfaces.KeyInterface | |
| additional_transformations: | |
| - _target_: flows.data_transformations.KeyMatchInput | |
| ### Flow Specification | |
| flow: User | |
| reset_every_round: true | |
| ### Output Interface | |
| output_interface: | |
| _target_: flows.interfaces.KeyInterface | |
| additional_transformations: | |
| - _target_: flows.data_transformations.RegexFirstOccurrenceExtractor | |
| regex: '(?<=```answer)([\s\S]*?)(?=```)' | |
| input_key: "human_input" | |
| output_key: "answer" | |
| strip: True | |
| assert_unique: True | |
| - _target_: flows.data_transformations.EndOfInteraction | |
| end_of_interaction_string: "<END>" | |
| input_key: "human_input" | |
| output_key: "end_of_interaction" | |
| early_exit_key: "end_of_interaction" | |