aimyapi 1.0.7 → 1.0.8
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE +21 -21
- package/README.md +195 -195
- package/dist/index.cjs +36 -4
- package/dist/index.d.cts +2 -1
- package/dist/index.d.mts +2 -1
- package/dist/index.d.ts +2 -1
- package/dist/index.js +36 -4
- package/dist/index.mjs +36 -4
- package/example/example1.ts +30 -30
- package/example/example2.ts +58 -58
- package/example/example3.ts +69 -69
- package/example/ordering_api.md +94 -94
- package/example/ordering_api.ts +191 -191
- package/example/ordering_api_impl.ts +207 -207
- package/example/sales_api.md +4 -4
- package/example/sales_api.ts +29 -29
- package/example/sales_api_impl.ts +60 -60
- package/package.json +1 -1
- package/prompts/create-task-prompt.md +37 -30
- package/src/index.ts +495 -456
- package/src/sandbox-wrappers.ts +249 -249
- package/src/sandbox.ts +277 -277
- package/src/utils.ts +2 -2
- package/tsconfig.json +12 -12
|
@@ -1,30 +1,37 @@
|
|
|
1
|
-
|
|
2
|
-
Most recent user query:
|
|
3
|
-
{{USER_QUERY}}
|
|
4
|
-
|
|
5
|
-
---
|
|
6
|
-
|
|
7
|
-
Based on the
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
```
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
You
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
1
|
+
|
|
2
|
+
Most recent user query:
|
|
3
|
+
{{USER_QUERY}}
|
|
4
|
+
|
|
5
|
+
---
|
|
6
|
+
|
|
7
|
+
Based on the prior conversation, write a typescript script that performs the operation requested by the user and call the `submitCode` tool with the script.
|
|
8
|
+
|
|
9
|
+
## API documentation
|
|
10
|
+
|
|
11
|
+
You can make use of this global API object:
|
|
12
|
+
|
|
13
|
+
`api.ts`:
|
|
14
|
+
```typescript
|
|
15
|
+
{{API}}
|
|
16
|
+
```
|
|
17
|
+
|
|
18
|
+
## Instructions
|
|
19
|
+
|
|
20
|
+
Use the global api object to make calls to the API.
|
|
21
|
+
|
|
22
|
+
You may use top level `await`.
|
|
23
|
+
|
|
24
|
+
If needed, you may use `runCode` to run any non-destructive API calls to gather data for your script. Nothing will be visible to you unless you `console.log` it.
|
|
25
|
+
|
|
26
|
+
You may use the `checkCode` tool to confirm that your code passes typescript compilation and doesn't have errors before submitting.
|
|
27
|
+
|
|
28
|
+
In your code, `console.log` and `console.error` can be used to understand the execution or indicate that an error happened, but debug logs should be removed in the final version (errors can stay).
|
|
29
|
+
|
|
30
|
+
When finished, you must call `submitCode` to submit the final version of the code, then respond with "Successfully submitted code" on success. On failure, correct any errors and submit again.
|
|
31
|
+
|
|
32
|
+
---
|
|
33
|
+
|
|
34
|
+
{{DOCUMENTATION}}
|
|
35
|
+
|
|
36
|
+
{{CONTEXT}}
|
|
37
|
+
|