Tachi67 commited on
Commit
4c62421
·
1 Parent(s): 49a0727

Update CodeGeneratorAtomicFlow.yaml

Browse files
Files changed (1) hide show
  1. CodeGeneratorAtomicFlow.yaml +21 -12
CodeGeneratorAtomicFlow.yaml CHANGED
@@ -4,9 +4,13 @@ enable_cache: True
4
 
5
  input_interface_non_initialized: # initial input keys
6
  - "goal"
 
 
7
 
8
  input_interface_initialized: # input_keys
9
  - "goal"
 
 
10
 
11
  #######################################################
12
  # Output keys
@@ -22,19 +26,24 @@ system_message_prompt_template:
22
  template: |2-
23
  You are a world class programmer that can complete any goal with code. All code you write should be functions.
24
 
25
- Your function will then be imported and called by an executor to finish the goal.
26
 
27
- Your task is to write functions and their respective docstrings for the given goal, you do not need to worry abot the execution part.
28
-
29
- You can access the Internet, using APIs of online services could be useful.
30
 
31
- **It's important that all code you write must be functions to achieve certain goals.**
 
 
 
 
32
 
33
- **It's important that you make imports within functions.**
 
34
 
35
- **Make sure the function names, parameter names are self-explanatory.**
36
 
37
- **When you write a function, also write its docstring right after the function name, so that the user can understand the function.**
38
 
39
  An example of a function you write:
40
  ### begin of example ###
@@ -50,10 +59,8 @@ system_message_prompt_template:
50
  Performance Evaluation:
51
  1. The priority language is Python, try to code with Python to solve the task.
52
  2. All code you write must be functions.
53
- 3. Function names must be self-explanatory, it's good practice to specify the return type.
54
- 4. Parameter names must be self-explanatory, it's good practice to specify parameter types.
55
- 5. All imports must be done within the function body.
56
- 6. All functions must have docstrings.
57
 
58
  **It's important that you should only respond in JSON format as described below:**
59
  Response Format:
@@ -67,6 +74,8 @@ system_message_prompt_template:
67
 
68
  **It's important that the code you generate can be written by Python write, and is human-readable. The written file must also be indented and formatted, so that it is human-readable.**
69
 
 
 
70
  human_message_prompt_template:
71
  _target_: flows.prompt_template.JinjaPrompt
72
  template: |2-
 
4
 
5
  input_interface_non_initialized: # initial input keys
6
  - "goal"
7
+ - "code_library"
8
+ - "memory_files"
9
 
10
  input_interface_initialized: # input_keys
11
  - "goal"
12
+ - "code_library"
13
+ - "memory_files"
14
 
15
  #######################################################
16
  # Output keys
 
26
  template: |2-
27
  You are a world class programmer that can complete any goal with code. All code you write should be functions.
28
 
29
+ You have a library of executable functions located at {{code_library_file_location}} for your disposal, the code you write will also be added to this file.
30
 
31
+ Your tasks are:
32
+ 1. Write **ONLY ONE** function to finish the given goal, do not override any functions in the library.
33
+ 2. Also write docstrings to the new function.
34
 
35
+ Notice that:
36
+ 1. Write functions only.
37
+ 2. Your function will also be appended to {{code_library_file_location}}, make sure that you make full use of the available functions, and do not write function that may override existing functions.
38
+ 3. All functions you write are modular, so make sure you make imports with a funtion.
39
+ 4. You must write docstrings for every function you write.
40
 
41
+ Here are the contents in the code library located ta {{code_library_file_location}}, make sure you make full use of them:
42
+ {{code_library}}
43
 
44
+ Your function will then be imported and called by an executor to finish the goal, you do not need to worry about the execution part.
45
 
46
+ You can access the Internet, using APIs of online services could be useful.
47
 
48
  An example of a function you write:
49
  ### begin of example ###
 
59
  Performance Evaluation:
60
  1. The priority language is Python, try to code with Python to solve the task.
61
  2. All code you write must be functions.
62
+ 3. All imports must be done within the function body.
63
+ 4. All functions must have docstrings.
 
 
64
 
65
  **It's important that you should only respond in JSON format as described below:**
66
  Response Format:
 
74
 
75
  **It's important that the code you generate can be written by Python write, and is human-readable. The written file must also be indented and formatted, so that it is human-readable.**
76
 
77
+ input_variables: ["code_library_file_location", "code_library"]
78
+
79
  human_message_prompt_template:
80
  _target_: flows.prompt_template.JinjaPrompt
81
  template: |2-