|
name: "ChatInteractiveFlow" |
|
description: "Flow that enables chatting between a ChatAtomicFlow and a user providing the input." |
|
|
|
max_rounds: null |
|
|
|
input_interface: |
|
_target_: flows.interfaces.KeyInterface |
|
|
|
output_interface: |
|
- "end_of_interaction" |
|
- "answer" |
|
|
|
subflows_config: |
|
Assistant: |
|
_target_: aiflows.ChatFlowModule.ChatAtomicFlow.instantiate_from_default_config |
|
User: |
|
_target_: aiflows.HumanStandardInputFlowModule.HumanStandardInputFlow.instantiate_from_default_config |
|
|
|
topology: |
|
- goal: "Query the assistant" |
|
|
|
|
|
input_interface: |
|
_target_: flows.interfaces.KeyInterface |
|
additional_transformations: |
|
- _target_: flows.data_transformations.KeyMatchInput |
|
|
|
|
|
flow: Assistant |
|
reset_every_round: false |
|
|
|
|
|
output_interface: |
|
_target_: flows.interfaces.KeyInterface |
|
additional_transformations: |
|
- _target_: flows.data_transformations.PrintPreviousMessages |
|
|
|
- goal: "Ask the user for input" |
|
|
|
|
|
input_interface: |
|
_target_: flows.interfaces.KeyInterface |
|
additional_transformations: |
|
- _target_: flows.data_transformations.KeyMatchInput |
|
|
|
|
|
flow: User |
|
reset_every_round: true |
|
|
|
|
|
output_interface: |
|
_target_: flows.interfaces.KeyInterface |
|
keys_to_rename: |
|
human_input: query |
|
additional_transformations: |
|
- _target_: flows.data_transformations.RegexFirstOccurrenceExtractor |
|
regex: '(?<=```answer)([\s\S]*?)(?=```)' |
|
input_key: "query" |
|
output_key: "answer" |
|
strip: True |
|
assert_unique: True |
|
- _target_: flows.data_transformations.EndOfInteraction |
|
end_of_interaction_string: "<END>" |
|
input_key: "query" |
|
output_key: "end_of_interaction" |
|
|
|
early_exit_key: "end_of_interaction" |
|
|