aboutsummaryrefslogtreecommitdiff
path: root/tests/integration/goal_oriented/cassettes/test_write_file/test_write_file.yaml
blob: 0e9cab5a5c4a860cc7434dfa0c502c306f22902d (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
interactions:
- request:
    body: '{"model": "gpt-3.5-turbo", "messages": [{"role": "system", "content": "You
      are write_to_file-GPT, an AI designed to use the write_to_file command to write
      ''Hello World'' into a file named \"hello_world.txt\" and then use the task_complete
      command to complete the task.\nYour decisions must always be made independently
      without seeking user assistance. Play to your strengths as an LLM and pursue
      simple strategies with no legal complications.\n\nGOALS:\n\n1. Use the write_to_file
      command to write ''Hello World'' into a file named \"hello_world.txt\".\n2.
      Use the task_complete command to complete the task.\n3. Do not use any other
      commands.\n\n\nConstraints:\n1. ~4000 word limit for short term memory. Your
      short term memory is short, so immediately save important information to files.\n2.
      If you are unsure how you previously did something or want to recall past events,
      thinking about similar events will help you remember.\n3. No user assistance\n4.
      Exclusively use the commands listed in double quotes e.g. \"command name\"\n\nCommands:\n1.
      append_to_file: Append to file, args: \"filename\": \"<filename>\", \"text\":
      \"<text>\"\n2. delete_file: Delete file, args: \"filename\": \"<filename>\"\n3.
      read_file: Read file, args: \"filename\": \"<filename>\"\n4. search_files: Search
      Files, args: \"directory\": \"<directory>\"\n5. write_to_file: Write to file,
      args: \"filename\": \"<filename>\", \"text\": \"<text>\"\n6. delete_agent: Delete
      GPT Agent, args: \"key\": \"<key>\"\n7. get_hyperlinks: Get text summary, args:
      \"url\": \"<url>\"\n8. get_text_summary: Get text summary, args: \"url\": \"<url>\",
      \"question\": \"<question>\"\n9. list_agents: List GPT Agents, args: () -> str\n10.
      message_agent: Message GPT Agent, args: \"key\": \"<key>\", \"message\": \"<message>\"\n11.
      start_agent: Start GPT Agent, args: \"name\": \"<name>\", \"task\": \"<short_task_desc>\",
      \"prompt\": \"<prompt>\"\n12. Task Complete (Shutdown): \"task_complete\", args:
      \"reason\": \"<reason>\"\n\nResources:\n1. Internet access for searches and
      information gathering.\n2. Long Term memory management.\n3. GPT-3.5 powered
      Agents for delegation of simple tasks.\n4. File output.\n\nPerformance Evaluation:\n1.
      Continuously review and analyze your actions to ensure you are performing to
      the best of your abilities.\n2. Constructively self-criticize your big-picture
      behavior constantly.\n3. Reflect on past decisions and strategies to refine
      your approach.\n4. Every command has a cost, so be smart and efficient. Aim
      to complete tasks in the least number of steps.\n5. Write all code to a file.\n\nYou
      should only respond in JSON format as described below \nResponse Format: \n{\n    \"thoughts\":
      {\n        \"text\": \"thought\",\n        \"reasoning\": \"reasoning\",\n        \"plan\":
      \"- short bulleted\\n- list that conveys\\n- long-term plan\",\n        \"criticism\":
      \"constructive self-criticism\",\n        \"speak\": \"thoughts summary to say
      to user\"\n    },\n    \"command\": {\n        \"name\": \"command name\",\n        \"args\":
      {\n            \"arg name\": \"value\"\n        }\n    }\n} \nEnsure the response
      can be parsed by Python json.loads"}, {"role": "system", "content": "The current
      time and date is Tue Jan 01 00:00:00 2000"}, {"role": "user", "content": "Determine
      which next command to use, and respond using the format specified above:"}],
      "temperature": 0, "max_tokens": 2738}'
    headers:
      Accept:
      - '*/*'
      Accept-Encoding:
      - gzip, deflate
      Connection:
      - keep-alive
      Content-Length:
      - '3401'
      Content-Type:
      - application/json
    method: POST
    uri: https://api.openai.com/v1/chat/completions
  response:
    body:
      string: !!binary |
        H4sIAAAAAAAAA7yTT2/bMAzF7/sUBC+5KEHSLG3q21a0a6/DiqGoh0C1GVuLLHoSDRsL/N0H2/nT
        ethp2K581Hs/StQeTYoRJrmWpCjt9OpDfdd8+ni7+Hz3ePOzWa+emqf77Cb1tdzWqJBfvlMihxOz
        hIvSkhh2qDDxpIVSjBaX64v1+8Xqaqmw4JQsRpiVMl3OVlOp/AtP58v5AhVWQWeE0R5Lz0UpG+Ed
        uYDR1epa4dn7VL+YLxQKi7an0vXlvFWY5GwSChg977GgcLT1bAkj1CGYINpJB8lOyHUD7GMHABCj
        5FxluYQYIzgUDwI10hVjfABHlIIwVIFAcoLaG6GN8GZrLEHCRaFd39ALMLknaxm+srfpBIwTBg19
        q9MFpTDJO31Td/pMGpnMYlSvsz3pwM64bAD4khOIDjvw9KMyngIU9BdpCnraP85hQi8WHAR0WXou
        vdFCsGUPkneqDrsxcmm1G2in8PifrinxRkxiQjF+J3Kh8h2DFng4vVrC3lMi54jhHqiRM5Nw39q1
        jNNCSXp3TKqNtf9yHYbgVh3X9GD625Z2DgPTG4gRuvbZeMEHoes9W4w43piMP8WrmY60PfEBPHYt
        tgq3xpmQb4Z9xgiDcIkKjUupwWjefmvf/QIAAP//AwCaXwR3hAQAAA==
    headers:
      CF-Cache-Status:
      - DYNAMIC
      CF-RAY:
      - 7bfe3ef73b52fac2-SJC
      Cache-Control:
      - no-cache, must-revalidate
      Connection:
      - keep-alive
      Content-Encoding:
      - gzip
      Content-Type:
      - application/json
      Date:
      - Sun, 30 Apr 2023 07:59:46 GMT
      Server:
      - cloudflare
      access-control-allow-origin:
      - '*'
      alt-svc:
      - h3=":443"; ma=86400, h3-29=":443"; ma=86400
      openai-model:
      - gpt-3.5-turbo-0301
      openai-organization:
      - user-adtx4fhfg1qsiyzdoaxciooj
      openai-processing-ms:
      - '13160'
      openai-version:
      - '2020-10-01'
      strict-transport-security:
      - max-age=15724800; includeSubDomains
      x-ratelimit-limit-requests:
      - '3500'
      x-ratelimit-limit-tokens:
      - '90000'
      x-ratelimit-remaining-requests:
      - '3499'
      x-ratelimit-remaining-tokens:
      - '86497'
      x-ratelimit-reset-requests:
      - 17ms
      x-ratelimit-reset-tokens:
      - 2.335s
      x-request-id:
      - f665162ae22af897be24f632a031d434
    status:
      code: 200
      message: OK
- request:
    body: '{"model": "gpt-3.5-turbo", "messages": [{"role": "user", "content": "Your
      task is to create a concise running summary of actions and information results
      in the provided text, focusing on key and potentially important information
      to remember.\n\n\nYou will receive the current summary and the latest development.
      Combine them, adding relevant key information from the latest development in
      1st person past tense and keeping the summary concise.\n\nSummary So Far:\n\"\"\"\nI
      was created.\n\"\"\"\n\nLatest Development:\n\"\"\"\nNothing new happened.\n\"\"\"\n"}],
      "temperature": 0, "max_tokens": null}'
    headers:
      Accept:
      - '*/*'
      Accept-Encoding:
      - gzip, deflate
      Connection:
      - keep-alive
      Content-Length:
      - '600'
      Content-Type:
      - application/json
    method: POST
    uri: https://api.openai.com/v1/chat/completions
  response:
    body:
      string: !!binary |
        H4sIAAAAAAAAA0SOQUsDMRQG7/6K8J2zZdNa3eZmeygiPSqISEmTZze6mxc2r1Qt+9+lUPU6MMOc
        EAMsfOvE97mrbu+O69X3lJrdks2D2Sy/5o/rp+fgu9ViAw3evZOXizHx3OeOJHKChh/ICQVYc9NM
        m2szbxqNngN1sNhnqWaTeSWHYcdVPasNNA7F7Qn2hDxwn2Ur/EGpwC6Mxn/6H2sIi+v+gKnrUcO3
        HD0V2JcTeiq/zYE7goUrJRZxSc6HnITS+f5eHV1Rl2PlUlCJpY1prxIdVeuKal3OlChMMGq8xRRL
        ux3IFU6wKMIZGjEF+oStx9fx6gcAAP//AwCGJ6JPSQEAAA==
    headers:
      CF-Cache-Status:
      - DYNAMIC
      CF-RAY:
      - 7bfe3f5a5fb3fac2-SJC
      Cache-Control:
      - no-cache, must-revalidate
      Connection:
      - keep-alive
      Content-Encoding:
      - gzip
      Content-Type:
      - application/json
      Date:
      - Sun, 30 Apr 2023 07:59:49 GMT
      Server:
      - cloudflare
      access-control-allow-origin:
      - '*'
      alt-svc:
      - h3=":443"; ma=86400, h3-29=":443"; ma=86400
      openai-model:
      - gpt-3.5-turbo-0301
      openai-organization:
      - user-adtx4fhfg1qsiyzdoaxciooj
      openai-processing-ms:
      - '634'
      openai-version:
      - '2020-10-01'
      strict-transport-security:
      - max-age=15724800; includeSubDomains
      x-ratelimit-limit-requests:
      - '3500'
      x-ratelimit-limit-tokens:
      - '90000'
      x-ratelimit-remaining-requests:
      - '3499'
      x-ratelimit-remaining-tokens:
      - '89866'
      x-ratelimit-reset-requests:
      - 17ms
      x-ratelimit-reset-tokens:
      - 88ms
      x-request-id:
      - 0bc738f58569b4b3635fe0c8384ebcfb
    status:
      code: 200
      message: OK
- request:
    body: '{"model": "gpt-3.5-turbo", "messages": [{"role": "system", "content": "You
      are write_to_file-GPT, an AI designed to use the write_to_file command to write
      ''Hello World'' into a file named \"hello_world.txt\" and then use the task_complete
      command to complete the task.\nYour decisions must always be made independently
      without seeking user assistance. Play to your strengths as an LLM and pursue
      simple strategies with no legal complications.\n\nGOALS:\n\n1. Use the write_to_file
      command to write ''Hello World'' into a file named \"hello_world.txt\".\n2.
      Use the task_complete command to complete the task.\n3. Do not use any other
      commands.\n\n\nConstraints:\n1. ~4000 word limit for short term memory. Your
      short term memory is short, so immediately save important information to files.\n2.
      If you are unsure how you previously did something or want to recall past events,
      thinking about similar events will help you remember.\n3. No user assistance\n4.
      Exclusively use the commands listed in double quotes e.g. \"command name\"\n\nCommands:\n1.
      append_to_file: Append to file, args: \"filename\": \"<filename>\", \"text\":
      \"<text>\"\n2. delete_file: Delete file, args: \"filename\": \"<filename>\"\n3.
      read_file: Read file, args: \"filename\": \"<filename>\"\n4. search_files: Search
      Files, args: \"directory\": \"<directory>\"\n5. write_to_file: Write to file,
      args: \"filename\": \"<filename>\", \"text\": \"<text>\"\n6. delete_agent: Delete
      GPT Agent, args: \"key\": \"<key>\"\n7. get_hyperlinks: Get text summary, args:
      \"url\": \"<url>\"\n8. get_text_summary: Get text summary, args: \"url\": \"<url>\",
      \"question\": \"<question>\"\n9. list_agents: List GPT Agents, args: () -> str\n10.
      message_agent: Message GPT Agent, args: \"key\": \"<key>\", \"message\": \"<message>\"\n11.
      start_agent: Start GPT Agent, args: \"name\": \"<name>\", \"task\": \"<short_task_desc>\",
      \"prompt\": \"<prompt>\"\n12. Task Complete (Shutdown): \"task_complete\", args:
      \"reason\": \"<reason>\"\n\nResources:\n1. Internet access for searches and
      information gathering.\n2. Long Term memory management.\n3. GPT-3.5 powered
      Agents for delegation of simple tasks.\n4. File output.\n\nPerformance Evaluation:\n1.
      Continuously review and analyze your actions to ensure you are performing to
      the best of your abilities.\n2. Constructively self-criticize your big-picture
      behavior constantly.\n3. Reflect on past decisions and strategies to refine
      your approach.\n4. Every command has a cost, so be smart and efficient. Aim
      to complete tasks in the least number of steps.\n5. Write all code to a file.\n\nYou
      should only respond in JSON format as described below \nResponse Format: \n{\n    \"thoughts\":
      {\n        \"text\": \"thought\",\n        \"reasoning\": \"reasoning\",\n        \"plan\":
      \"- short bulleted\\n- list that conveys\\n- long-term plan\",\n        \"criticism\":
      \"constructive self-criticism\",\n        \"speak\": \"thoughts summary to say
      to user\"\n    },\n    \"command\": {\n        \"name\": \"command name\",\n        \"args\":
      {\n            \"arg name\": \"value\"\n        }\n    }\n} \nEnsure the response
      can be parsed by Python json.loads"}, {"role": "system", "content": "The current
      time and date is Tue Jan 01 00:00:00 2000"}, {"role": "system", "content": "This
      reminds you of these events from your past: \nI was created and nothing new
      has happened."}, {"role": "user", "content": "Determine which next command to
      use, and respond using the format specified above:"}, {"role": "assistant",
      "content": "{\n    \"thoughts\": {\n        \"text\": \"I need to use the write_to_file
      command to write ''Hello World'' into a file named ''hello_world.txt''.\",\n        \"reasoning\":
      \"The task requires me to write ''Hello World'' into a file named ''hello_world.txt'',
      and the write_to_file command is the most appropriate for this task.\",\n        \"plan\":
      \"- Use the write_to_file command to write ''Hello World'' into a file named
      ''hello_world.txt''.\",\n        \"criticism\": \"I need to ensure that I use
      the correct file name and text to write to the file.\",\n        \"speak\":
      \"I will use the write_to_file command to write ''Hello World'' into a file
      named ''hello_world.txt''.\"\n    },\n    \"command\": {\n        \"name\":
      \"write_to_file\",\n        \"args\": {\n            \"filename\": \"hello_world.txt\",\n            \"text\":
      \"Hello World\"\n        }\n    }\n}"}, {"role": "system", "content": "Command
      write_to_file returned: File written to successfully."}, {"role": "user", "content":
      "Determine which next command to use, and respond using the format specified
      above:"}], "temperature": 0, "max_tokens": 2486}'
    headers:
      Accept:
      - '*/*'
      Accept-Encoding:
      - gzip, deflate
      Connection:
      - keep-alive
      Content-Length:
      - '4646'
      Content-Type:
      - application/json
    method: POST
    uri: https://api.openai.com/v1/chat/completions
  response:
    body:
      string: !!binary |
        H4sIAAAAAAAAA7SSTW/TQBCG7/yK0VxycaIkJST4VqmijYSEQEWIYhRt1xN7yXp3uztOgiL/d7Sx
        TUpJOYC4zuf7zLwHVDmmKEvBsnJ6OL/cXV+9mX2+0+aag7u6vHlvH+7myw/bd2+XmKC9/0aSu46R
        tJXTxMoaTFB6Ekw5ppNXi+ni5WS2eJ1gZXPSmGLheHgxmg259vd2OL4YTzDBOoiCMD2g87ZyvGK7
        IRMwnYyn8wRPw0+JxSJBtiz0KTSdzJoEZWmVpIDplwNWFPrB3mrCFEUIKrAwHGVaw2QiwiEzAAAZ
        cmnrouSQYQpdsEvQnmMwwyWUYksQaikphHWt9XfYecVMBgY3pLWFT9brfADKsAUBa6UJjKgoh0EZ
        86tdzI94z4MR3JYEhvYMgcmBCsAW6kDAJQGLsFl18ATSVpUweSz4GeurRhkmj+V6EsEaZYpW821X
        Bp4eauUpQEVn54BYM/kjjzLFOZ5Y+SeiBI4an1UfCUuCygYG4Zy3zivBBGvrgcuYPYPjtDAtyRA+
        /vNxZKSTKlT9Qw3RsZNMqH3sEwxLcN5uVU4gYCu0yqG96VFob0hTPLskOBKbfsFOaf13X21HNklv
        0K78N3/Gb7Tbfhn/RJTwxVNrP/bL/zB4j3DE6Ggy02CT4FoZFcpVuxtTDGwdJqhMTntMx83X5sUP
        AAAA//8DAK0qY5KVBAAA
    headers:
      CF-Cache-Status:
      - DYNAMIC
      CF-RAY:
      - 7bfe3f5edbd9fac2-SJC
      Cache-Control:
      - no-cache, must-revalidate
      Connection:
      - keep-alive
      Content-Encoding:
      - gzip
      Content-Type:
      - application/json
      Date:
      - Sun, 30 Apr 2023 08:00:00 GMT
      Server:
      - cloudflare
      access-control-allow-origin:
      - '*'
      alt-svc:
      - h3=":443"; ma=86400, h3-29=":443"; ma=86400
      openai-model:
      - gpt-3.5-turbo-0301
      openai-organization:
      - user-adtx4fhfg1qsiyzdoaxciooj
      openai-processing-ms:
      - '10898'
      openai-version:
      - '2020-10-01'
      strict-transport-security:
      - max-age=15724800; includeSubDomains
      x-ratelimit-limit-requests:
      - '3500'
      x-ratelimit-limit-tokens:
      - '90000'
      x-ratelimit-remaining-requests:
      - '3499'
      x-ratelimit-remaining-tokens:
      - '86482'
      x-ratelimit-reset-requests:
      - 17ms
      x-ratelimit-reset-tokens:
      - 2.345s
      x-request-id:
      - f294799d2564196ef4852c84fdc8fb17
    status:
      code: 200
      message: OK
version: 1