consistent with flows change
#1
by
yeeef
- opened
- .gitignore +5 -1
- OpenAIChatGPT4.py +6 -4
- OpenAIChatGPT4.yaml +7 -5
.gitignore
CHANGED
@@ -158,4 +158,8 @@ cython_debug/
|
|
158 |
# and can be added to the global gitignore or merged into this file. For a more nuclear
|
159 |
# option (not recommended) you can uncomment the following to ignore the entire idea folder.
|
160 |
.idea/
|
161 |
-
.*cache*/
|
|
|
|
|
|
|
|
|
|
158 |
# and can be added to the global gitignore or merged into this file. For a more nuclear
|
159 |
# option (not recommended) you can uncomment the following to ignore the entire idea folder.
|
160 |
.idea/
|
161 |
+
.*cache*/
|
162 |
+
|
163 |
+
|
164 |
+
# auto-generated by flows, all synced moduels will be ignored by default
|
165 |
+
FLOW_MODULE_ID
|
OpenAIChatGPT4.py
CHANGED
@@ -1,8 +1,10 @@
|
|
1 |
-
|
|
|
|
|
|
|
|
|
2 |
|
3 |
-
from
|
4 |
-
OpenAIChatAtomicFlow_repository_id = os.environ.get("OpenAIChatAtomicFlow")
|
5 |
-
OpenAIChatAtomicFlow = load_class(OpenAIChatAtomicFlow_repository_id, "OpenAIChatAtomicFlow")
|
6 |
|
7 |
class OpenAIChatGPT4(OpenAIChatAtomicFlow):
|
8 |
def __init__(self, **kwargs):
|
|
|
1 |
+
dependencies = [
|
2 |
+
{"url": "/Users/yeeef/Desktop/dlab-ra/OpenAIChatAtomicFlow", "overwrite": True}
|
3 |
+
]
|
4 |
+
from flows import flow_verse
|
5 |
+
flow_verse.sync_dependencies(dependencies)
|
6 |
|
7 |
+
from flow_modules.local.OpenAIChatAtomicFlow import OpenAIChatAtomicFlow
|
|
|
|
|
8 |
|
9 |
class OpenAIChatGPT4(OpenAIChatAtomicFlow):
|
10 |
def __init__(self, **kwargs):
|
OpenAIChatGPT4.yaml
CHANGED
@@ -38,18 +38,20 @@ query_message_prompt_template:
|
|
38 |
template_format: jinja2
|
39 |
|
40 |
|
41 |
-
|
42 |
-
|
43 |
-
_target_: flows.message_annotators.RegexFirstOccurrenceExtractor
|
44 |
regex: '(.*)'
|
45 |
-
|
|
|
46 |
strip: True
|
47 |
assert_unique: True
|
48 |
verbose: True
|
49 |
|
|
|
|
|
50 |
input_keys:
|
51 |
- "query" # "human_input"
|
52 |
|
53 |
output_keys:
|
54 |
-
- "
|
55 |
|
|
|
38 |
template_format: jinja2
|
39 |
|
40 |
|
41 |
+
output_data_transformations:
|
42 |
+
- _target_: flows.data_transformations.RegexFirstOccurrenceExtractor
|
|
|
43 |
regex: '(.*)'
|
44 |
+
input_key: "raw_response"
|
45 |
+
output_key: "bot_reply"
|
46 |
strip: True
|
47 |
assert_unique: True
|
48 |
verbose: True
|
49 |
|
50 |
+
keep_raw_response: False
|
51 |
+
|
52 |
input_keys:
|
53 |
- "query" # "human_input"
|
54 |
|
55 |
output_keys:
|
56 |
+
- "bot_reply"
|
57 |
|