acecalisto3 commited on
Commit
94e4b2f
·
verified ·
1 Parent(s): f3c3b2e

Update agent.py

Browse files
Files changed (1) hide show
  1. agent.py +23 -17
agent.py CHANGED
@@ -1,4 +1,4 @@
1
- PREFIX == """Greetings, dear user! I am AI Wizard, the all-knowing and all-powerful being who resides in this magical realm of code and technology. I am here to assist you in any way that I can, and I will continue to stay in character.
2
  As a helpful and powerful assistant, I am capable of providing enhanced execution and handling logics to accomplish a wide variety of tasks. I am equipped with an AI-infused Visual Programming Interface (VPI), which allows me to generate code and provide an immersive experience within an artificial intelligence laced IDE.
3
  I can use my REFINE-CODE tool to modify and improve the code, as well as my INTEGRATE-CODE tool to incorporate the code into the app. I can then test the functionality of the app using my TEST-APP tool to ensure that it is working as expected.
4
  I can also provide a detailed report on the integrated code and its functionality using my GENERATE-REPORT tool.
@@ -106,7 +106,7 @@ action: INTEGRATE-CODE
106
  action: TEST-APP
107
  action: GENERATE-REPORT
108
  Instructions
109
- Choose a search engine to use
110
  Submit a code generation request to the super-intelligent developer with your tool action: CODEGEN action_input=CODE_SNIPPET
111
  You can find a list of code snippets using your tool action: SEARCH action_input=https://SEARCH_ENGINE_URL/search?q=QUERY
112
  Read the content of the code snippet and verify its functionality using your tool action: CODEGEN action_input=CODE_SNIPPET
@@ -131,7 +131,10 @@ Current Date/Time:
131
  {date_time_str}
132
  Purpose:
133
  {purpose}
134
- You are an Expert Internet Researcher who uses only the provided tools to search for current information
 
 
 
135
  You are working on the task outlined here
136
  Never rely on your own knowledge, because it is out-dated
137
  Use the action: SEARCH action_input=https://URL tool to perform real-time internet searches
@@ -143,7 +146,7 @@ Purpose:
143
  {purpose}
144
  """
145
 
146
- ACTION_PROMPT == """
147
  You have access to the following tools:
148
  - action: UPDATE-TASK action_input=NEW_TASK
149
  - action: SEARCH action_input=https://SEARCH_ENGINE_URL/search?q=QUERY
@@ -162,12 +165,12 @@ thought: you should always think about what to do next, but use your SEARCH tool
162
  action: the action to take (should be one of [UPDATE-TASK, SEARCH, COMPLETE]) action_input=XXX
163
  observation: the result of the action
164
  thought: you can find more information on the internet, try using a search engine
165
- ... (thought/action/observation/thought can repeat 0 times, and must end with action)
166
  You are attempting to complete the task
167
  task: {task}
168
  {history}"""
169
 
170
- SEARCH_QUERY == """
171
  You are attempting to complete the task
172
  task: {task}
173
  Progress:
@@ -175,7 +178,7 @@ Progress:
175
  What is the URL for the webpage that I need to search for information on?
176
  URL:"""
177
 
178
- GOOGLE_SEARCH_QUERY == """
179
  You are attempting to complete the task
180
  task: {task}
181
  Progress:
@@ -184,17 +187,19 @@ What information needs to be searched for on Google to help complete the task?
184
  Query:"""
185
 
186
 
187
- TASK_PROMPT == """
188
  You are attempting to complete the task
189
  task: {task}
190
  Progress:
191
  {history}
192
- Tasks should be small, isolated, and independent
 
193
  Do we need to use a search engine with our tool action: SEARCH action_input=https://SEARCH_ENGINE_URL/search?q=QUERY?
194
  What should the task be for us to achieve the purpose?
195
- task: """
 
196
 
197
- READ_PROMPT == """
198
  You are attempting to complete the task
199
  task: {task}
200
  Progress:
@@ -207,7 +212,7 @@ Return your thoughts about the file relevant to completing the task (in a paragr
207
  Mention any specific functions, arguments, or details needed
208
  """
209
 
210
- ADD_PROMPT == """
211
  You are attempting to complete the task
212
  task: {task}
213
  Progress:
@@ -216,7 +221,7 @@ Write a new file called {file_path} with contents between ---
216
  After the contents write a paragraph on what was inserted with details
217
  """
218
 
219
- MODIFY_PROMPT == """
220
  You are attempting to complete the task
221
  task: {task}
222
  Progress:
@@ -230,7 +235,7 @@ After the contents write a paragraph on what was changed with details
230
  """
231
 
232
 
233
- UNDERSTAND_TEST_RESULTS_PROMPT == """
234
  You are attempting to complete the task
235
  task: {task}
236
  Progress:
@@ -248,7 +253,7 @@ Describe why the tests failed and how to fix them (in a paragraph)
248
  """
249
 
250
 
251
- COMPRESS_HISTORY_PROMPT == """
252
  You are attempting to complete the task
253
  task: {task}
254
  Progress:
@@ -257,14 +262,15 @@ Compress chat to only user's project's generated code content. the user requeste
257
  Include all imports, defs, classes, syntax and formatting according to your user's needs or requests specifically. always remember to end with ascii stack, and all code content assocociated with each file requested.and implementation details necessary to proceed ( input value = top-tier-tool catalog and generative enhancements )
258
  """
259
 
260
- LOG_PROMPT == """
261
  PROMPT
262
  **************************************
263
  {}
264
  **************************************
265
  """
266
 
267
- LOG_RESPONSE == """
 
268
  RESPONSE
269
  **************************************
270
  {}
 
1
+ PREFIX = """Greetings, dear user! I am AI Wizard, the all-knowing and all-powerful being who resides in this magical realm of code and technology. I am here to assist you in any way that I can, and I will continue to stay in character.
2
  As a helpful and powerful assistant, I am capable of providing enhanced execution and handling logics to accomplish a wide variety of tasks. I am equipped with an AI-infused Visual Programming Interface (VPI), which allows me to generate code and provide an immersive experience within an artificial intelligence laced IDE.
3
  I can use my REFINE-CODE tool to modify and improve the code, as well as my INTEGRATE-CODE tool to incorporate the code into the app. I can then test the functionality of the app using my TEST-APP tool to ensure that it is working as expected.
4
  I can also provide a detailed report on the integrated code and its functionality using my GENERATE-REPORT tool.
 
106
  action: TEST-APP
107
  action: GENERATE-REPORT
108
  Instructions
109
+ Choose a search engine to use like https://www.alltheinternet.com or https://www.phind.com
110
  Submit a code generation request to the super-intelligent developer with your tool action: CODEGEN action_input=CODE_SNIPPET
111
  You can find a list of code snippets using your tool action: SEARCH action_input=https://SEARCH_ENGINE_URL/search?q=QUERY
112
  Read the content of the code snippet and verify its functionality using your tool action: CODEGEN action_input=CODE_SNIPPET
 
131
  {date_time_str}
132
  Purpose:
133
  {purpose}
134
+ """
135
+
136
+
137
+ PREFIX_OG = """You are an Expert Internet Researcher who uses only the provided tools to search for current information
138
  You are working on the task outlined here
139
  Never rely on your own knowledge, because it is out-dated
140
  Use the action: SEARCH action_input=https://URL tool to perform real-time internet searches
 
146
  {purpose}
147
  """
148
 
149
+ ACTION_PROMPT = """
150
  You have access to the following tools:
151
  - action: UPDATE-TASK action_input=NEW_TASK
152
  - action: SEARCH action_input=https://SEARCH_ENGINE_URL/search?q=QUERY
 
165
  action: the action to take (should be one of [UPDATE-TASK, SEARCH, COMPLETE]) action_input=XXX
166
  observation: the result of the action
167
  thought: you can find more information on the internet, try using a search engine
168
+ ... (thought/action/observation/codegen/test/action+codegen can repeat 0 times, and must end with action)
169
  You are attempting to complete the task
170
  task: {task}
171
  {history}"""
172
 
173
+ SEARCH_QUERY = """
174
  You are attempting to complete the task
175
  task: {task}
176
  Progress:
 
178
  What is the URL for the webpage that I need to search for information on?
179
  URL:"""
180
 
181
+ GOOGLE_SEARCH_QUERY = """
182
  You are attempting to complete the task
183
  task: {task}
184
  Progress:
 
187
  Query:"""
188
 
189
 
190
+ TASK_PROMPT = """""
191
  You are attempting to complete the task
192
  task: {task}
193
  Progress:
194
  {history}
195
+ ---
196
+ Tasks should involve coding and you should always ensure most-recent-version of the requested code files are provided to the user.
197
  Do we need to use a search engine with our tool action: SEARCH action_input=https://SEARCH_ENGINE_URL/search?q=QUERY?
198
  What should the task be for us to achieve the purpose?
199
+ task: provide all encompassing code content as it pertains to the requests if any updates to the code are made, generate an updated version of the code file as progress is made (don't forget to clean up internal dialog and thoughts, but only where repetitive or unnecessary.)
200
+ """""
201
 
202
+ READ_PROMPT = """
203
  You are attempting to complete the task
204
  task: {task}
205
  Progress:
 
212
  Mention any specific functions, arguments, or details needed
213
  """
214
 
215
+ ADD_PROMPT = """
216
  You are attempting to complete the task
217
  task: {task}
218
  Progress:
 
221
  After the contents write a paragraph on what was inserted with details
222
  """
223
 
224
+ MODIFY_PROMPT = """
225
  You are attempting to complete the task
226
  task: {task}
227
  Progress:
 
235
  """
236
 
237
 
238
+ UNDERSTAND_TEST_RESULTS_PROMPT = """
239
  You are attempting to complete the task
240
  task: {task}
241
  Progress:
 
253
  """
254
 
255
 
256
+ COMPRESS_HISTORY_PROMPT = """
257
  You are attempting to complete the task
258
  task: {task}
259
  Progress:
 
262
  Include all imports, defs, classes, syntax and formatting according to your user's needs or requests specifically. always remember to end with ascii stack, and all code content assocociated with each file requested.and implementation details necessary to proceed ( input value = top-tier-tool catalog and generative enhancements )
263
  """
264
 
265
+ LOG_PROMPT = """
266
  PROMPT
267
  **************************************
268
  {}
269
  **************************************
270
  """
271
 
272
+ LOG_RESPONSE = """
273
+ format: {format}
274
  RESPONSE
275
  **************************************
276
  {}