nbaldwin commited on
Commit
6b17c8c
·
1 Parent(s): cfb3677

renamed flows to ai flows

Browse files
Files changed (5) hide show
  1. AutoGPTFlow.py +2 -2
  2. AutoGPTFlow.yaml +9 -9
  3. __init__.py +1 -1
  4. demo.yaml +4 -4
  5. run.py +7 -7
AutoGPTFlow.py CHANGED
@@ -1,8 +1,8 @@
1
  import sys
2
  from typing import Dict, Any
3
 
4
- from flows.base_flows import CircularFlow
5
- from flows.utils import logging
6
 
7
  logging.set_verbosity_debug()
8
 
 
1
  import sys
2
  from typing import Dict, Any
3
 
4
+ from aiflows.base_flows import CircularFlow
5
+ from aiflows.utils import logging
6
 
7
  logging.set_verbosity_debug()
8
 
AutoGPTFlow.yaml CHANGED
@@ -13,7 +13,7 @@ output_interface:
13
  ### Subflows specification
14
  subflows_config:
15
  Controller:
16
- _target_: aiflows.ControllerExecutorFlowModule.ControllerAtomicFlow.instantiate_from_default_config
17
  finish:
18
  description: "Signal that the objective has been satisfied, and returns the answer to the user."
19
  input_args: ["answer"]
@@ -44,7 +44,7 @@ subflows_config:
44
  - "memory"
45
 
46
  Executor:
47
- _target_: flows.base_flows.BranchingFlow.instantiate_from_default_config
48
  # E.g.,
49
  # subflows_config:
50
  # wiki_search:
@@ -55,7 +55,7 @@ subflows_config:
55
  # _target_: langchain.tools.DuckDuckGoSearchRun
56
 
57
  HumanFeedback:
58
- _target_: aiflows.HumanStandardInputFlowModule.HumanStandardInputFlow.instantiate_from_default_config
59
  request_multi_line_input_flag: False
60
  query_message_prompt_template:
61
  template: |2-
@@ -85,7 +85,7 @@ subflows_config:
85
  - "observation"
86
 
87
  Memory:
88
- _target_: aiflows.VectorStoreFlowModule.ChromaDBFlow.instantiate_from_default_config
89
  n_results: 2
90
 
91
  topology:
@@ -99,9 +99,9 @@ topology:
99
 
100
  - goal: "Select the next action and prepare the input for the executor."
101
  input_interface:
102
- _target_: flows.interfaces.KeyInterface
103
  additional_transformations:
104
- - _target_: flows.data_transformations.KeyMatchInput
105
  flow: Controller
106
  output_interface:
107
  _target_: AutoGPTFlow.detect_finish_or_continue # An interface defined as a function in the Flow class
@@ -109,14 +109,14 @@ topology:
109
 
110
  - goal: "Execute the action specified by the Controller."
111
  input_interface:
112
- _target_: flows.interfaces.KeyInterface
113
  keys_to_rename:
114
  command: branch
115
  command_args: branch_input_data
116
  keys_to_select: ["branch", "branch_input_data"]
117
  flow: Executor
118
  output_interface:
119
- _target_: flows.interfaces.KeyInterface
120
  keys_to_rename:
121
  branch_output_data: observation
122
  keys_to_select: ["observation"]
@@ -124,7 +124,7 @@ topology:
124
 
125
  - goal: "Ask the user for feedback."
126
  input_interface:
127
- _target_: flows.interfaces.KeyInterface
128
  flow: HumanFeedback
129
  output_interface:
130
  _target_: AutoGPTFlow.detect_finish_in_human_input
 
13
  ### Subflows specification
14
  subflows_config:
15
  Controller:
16
+ _target_: flow_modules.aiflows.ControllerExecutorFlowModule.ControllerAtomicFlow.instantiate_from_default_config
17
  finish:
18
  description: "Signal that the objective has been satisfied, and returns the answer to the user."
19
  input_args: ["answer"]
 
44
  - "memory"
45
 
46
  Executor:
47
+ _target_: aiflows.base_flows.BranchingFlow.instantiate_from_default_config
48
  # E.g.,
49
  # subflows_config:
50
  # wiki_search:
 
55
  # _target_: langchain.tools.DuckDuckGoSearchRun
56
 
57
  HumanFeedback:
58
+ _target_: flow_modules.aiflows.HumanStandardInputFlowModule.HumanStandardInputFlow.instantiate_from_default_config
59
  request_multi_line_input_flag: False
60
  query_message_prompt_template:
61
  template: |2-
 
85
  - "observation"
86
 
87
  Memory:
88
+ _target_: flow_modules.aiflows.VectorStoreFlowModule.ChromaDBFlow.instantiate_from_default_config
89
  n_results: 2
90
 
91
  topology:
 
99
 
100
  - goal: "Select the next action and prepare the input for the executor."
101
  input_interface:
102
+ _target_: aiflows.interfaces.KeyInterface
103
  additional_transformations:
104
+ - _target_: aiflows.data_transformations.KeyMatchInput
105
  flow: Controller
106
  output_interface:
107
  _target_: AutoGPTFlow.detect_finish_or_continue # An interface defined as a function in the Flow class
 
109
 
110
  - goal: "Execute the action specified by the Controller."
111
  input_interface:
112
+ _target_: aiflows.interfaces.KeyInterface
113
  keys_to_rename:
114
  command: branch
115
  command_args: branch_input_data
116
  keys_to_select: ["branch", "branch_input_data"]
117
  flow: Executor
118
  output_interface:
119
+ _target_: aiflows.interfaces.KeyInterface
120
  keys_to_rename:
121
  branch_output_data: observation
122
  keys_to_select: ["observation"]
 
124
 
125
  - goal: "Ask the user for feedback."
126
  input_interface:
127
+ _target_: aiflows.interfaces.KeyInterface
128
  flow: HumanFeedback
129
  output_interface:
130
  _target_: AutoGPTFlow.detect_finish_in_human_input
__init__.py CHANGED
@@ -7,7 +7,7 @@ dependencies = [
7
  {"url": "aiflows/VectorStoreFlowModule",
8
  "revision": "main"},
9
  ]
10
- from flows import flow_verse
11
 
12
  flow_verse.sync_dependencies(dependencies)
13
  # ~~~
 
7
  {"url": "aiflows/VectorStoreFlowModule",
8
  "revision": "main"},
9
  ]
10
+ from aiflows import flow_verse
11
 
12
  flow_verse.sync_dependencies(dependencies)
13
  # ~~~
demo.yaml CHANGED
@@ -1,11 +1,11 @@
1
  flow:
2
- _target_: aiflows.AutoGPTFlowModule.AutoGPTFlow.instantiate_from_default_config
3
  max_rounds: 30
4
 
5
  ### Subflows specification
6
  subflows_config:
7
  Controller:
8
- _target_: aiflows.ControllerExecutorFlowModule.ControllerAtomicFlow.instantiate_from_default_config
9
  commands:
10
  wiki_search:
11
  description: "Performs a search on Wikipedia."
@@ -29,10 +29,10 @@ flow:
29
  - "human_feedback"
30
 
31
  Executor:
32
- _target_: flows.base_flows.BranchingFlow.instantiate_from_default_config
33
  subflows_config:
34
  wiki_search:
35
- _target_: aiflows.ControllerExecutorFlowModule.WikiSearchAtomicFlow.instantiate_from_default_config
36
 
37
 
38
  Memory:
 
1
  flow:
2
+ _target_: flow_modules.aiflows.AutoGPTFlowModule.AutoGPTFlow.instantiate_from_default_config
3
  max_rounds: 30
4
 
5
  ### Subflows specification
6
  subflows_config:
7
  Controller:
8
+ _target_: flow_modules.aiflows.ControllerExecutorFlowModule.ControllerAtomicFlow.instantiate_from_default_config
9
  commands:
10
  wiki_search:
11
  description: "Performs a search on Wikipedia."
 
29
  - "human_feedback"
30
 
31
  Executor:
32
+ _target_: aiflows.base_flows.BranchingFlow.instantiate_from_default_config
33
  subflows_config:
34
  wiki_search:
35
+ _target_: flow_modules.aiflows.ControllerExecutorFlowModule.WikiSearchAtomicFlow.instantiate_from_default_config
36
 
37
 
38
  Memory:
run.py CHANGED
@@ -2,13 +2,13 @@ import os
2
 
3
  import hydra
4
 
5
- import flows
6
- from flows.flow_launchers import FlowLauncher
7
- from flows.backends.api_info import ApiInfo
8
- from flows.utils.general_helpers import read_yaml_file
9
 
10
- from flows import logging
11
- from flows.flow_cache import CACHING_PARAMETERS, clear_cache
12
 
13
  CACHING_PARAMETERS.do_caching = False # Set to True in order to disable caching
14
  # clear_cache() # Uncomment this line to clear the cache
@@ -19,7 +19,7 @@ dependencies = [
19
  {"url": "aiflows/AutoGPTFlowModule", "revision": os.getcwd()},
20
  {"url": "aiflows/LCToolFlowModule", "revision": "main"},
21
  ]
22
- from flows import flow_verse
23
 
24
  flow_verse.sync_dependencies(dependencies)
25
  if __name__ == "__main__":
 
2
 
3
  import hydra
4
 
5
+ import aiflows
6
+ from aiflows.flow_launchers import FlowLauncher
7
+ from aiflows.backends.api_info import ApiInfo
8
+ from aiflows.utils.general_helpers import read_yaml_file
9
 
10
+ from aiflows import logging
11
+ from aiflows.flow_cache import CACHING_PARAMETERS, clear_cache
12
 
13
  CACHING_PARAMETERS.do_caching = False # Set to True in order to disable caching
14
  # clear_cache() # Uncomment this line to clear the cache
 
19
  {"url": "aiflows/AutoGPTFlowModule", "revision": os.getcwd()},
20
  {"url": "aiflows/LCToolFlowModule", "revision": "main"},
21
  ]
22
+ from aiflows import flow_verse
23
 
24
  flow_verse.sync_dependencies(dependencies)
25
  if __name__ == "__main__":