Smirnov yeeef commited on
Commit
070addd
1 Parent(s): 1849a87

change the dependency revision to main (#2)

Browse files

- migrate to sync dep (3abf420722e07295ab26dda3c11fd15243098b2f)
- change to another branch (3e773ee5c226fecdbe686b369a4f20610a1ff551)
- change the dependency revision to main (181805764a136783df78373b3e834af0a6b22e14)
- use output_data_transformations (b82d09e879ce2cc52f1a13b81709e46a7a3522bd)


Co-authored-by: Yeeef <yeeef@users.noreply.huggingface.co>

Files changed (3) hide show
  1. .gitignore +5 -1
  2. OpenAIChatGPT4.py +6 -4
  3. OpenAIChatGPT4.yaml +5 -4
.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 modules will be ignored by default
165
+ FLOW_MODULE_ID
OpenAIChatGPT4.py CHANGED
@@ -1,8 +1,10 @@
1
- import os
 
 
 
 
2
 
3
- from flows.flow_verse import load_class
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": "martinjosifoski/OpenAIChatAtomicFlow", "revision": "main"},
3
+ ]
4
+ from flows import flow_verse
5
+ flow_verse.sync_dependencies(dependencies)
6
 
7
+ from flow_modules.martinjosifoski.OpenAIChatAtomicFlow import OpenAIChatAtomicFlow
 
 
8
 
9
  class OpenAIChatGPT4(OpenAIChatAtomicFlow):
10
  def __init__(self, **kwargs):
OpenAIChatGPT4.yaml CHANGED
@@ -37,12 +37,13 @@ query_message_prompt_template:
37
  - "query" # # "human_input"
38
  template_format: jinja2
39
 
 
40
 
41
- response_annotators:
42
- code_extractor:
43
- _target_: flows.message_annotators.RegexFirstOccurrenceExtractor
44
  regex: '(.*)'
45
- key: "response"
 
46
  strip: True
47
  assert_unique: True
48
  verbose: True
 
37
  - "query" # # "human_input"
38
  template_format: jinja2
39
 
40
+ keep_raw_response: False
41
 
42
+ output_data_transformations:
43
+ - _target_: flows.data_transformations.RegexFirstOccurrenceExtractor
 
44
  regex: '(.*)'
45
+ input_key: "raw_response"
46
+ output_key: "response"
47
  strip: True
48
  assert_unique: True
49
  verbose: True