File size: 1,872 Bytes
e0487cd
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
name: "InteractivePlanGenFlow"
description: "Generate step by step plan as goal requests, open up a temp file for the user to examine and provide feedback"

_target_: flow_modules.aiflows.InteractivePlanGenFlowModule.InteractivePlanGenFlow.instantiate_from_default_config

input_interface:
  - "goal"
  - "plan_file_location"

output_interface:
  - "plan"
  - "feedback"
  - "temp_plan_file_location"

subflows_config:
  PlanGenerator:
    _target_: flow_modules.aiflows.PlanGeneratorFlowModule.PlanGeneratorAtomicFlow.instantiate_from_default_config
    backend:
      api_infos: ???
      model_name:
        openai: gpt-4
        azure: azure/gpt-4

  PlanFileEditor:
    _target_: flow_modules.aiflows.PlanFileEditFlowModule.PlanFileEditAtomicFlow.instantiate_from_default_config

  ParseFeedback:
    _target_: flow_modules.aiflows.ParseFeedbackFlowModule.ParseFeedbackAtomicFlow.instantiate_from_default_config
    input_interface:
      - "temp_plan_file_location"
    output_interface:
      - "plan"
      - "feedback"

early_exit_key: "EARLY_EXIT"

topology:
  - goal: "Generate plan to achieve the task."
    input_interface:
      _target_: aiflows.interfaces.KeyInterface
      additional_transformations:
        - _target_: aiflows.data_transformations.KeyMatchInput
    flow: PlanGenerator
    reset: false

  - goal: "Write the plan generated to a temp file with instructions to the user"
    input_interface:
      _target_: aiflows.interfaces.KeyInterface
      additional_transformations:
        - _target_: aiflows.data_transformations.KeyMatchInput
    flow: PlanFileEditor
    reset: false

  - goal: "Parse user feedback from the temp file"
    input_interface:
      _target_: aiflows.interfaces.KeyInterface
      additional_transformations:
        - _target_: aiflows.data_transformations.KeyMatchInput
    flow: ParseFeedback
    reset: false