You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+57Lines changed: 57 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -135,6 +135,63 @@ with open('downloaded.txt', 'wb') as f:
135
135
storage.delete('myfile.txt')
136
136
```
137
137
138
+
## Prompt to use if you are asking LLM to write code
139
+
140
+
You can use the following prompt to ask LLM to write code that the YepCode Run SDK can execute.
141
+
142
+
You should replace the `{{task}}` and `{{envVars}}` placeholders with the actual task and environment variables names already set in your YepCode workspace.
143
+
144
+
```text
145
+
Acts as a coding agent to help the user to achieve the described task generating a standalone script in either JavaScript or Python. Do not write any explainations, just write the code.
146
+
147
+
The task to solve is:
148
+
149
+
=====
150
+
{{task}}
151
+
=====
152
+
153
+
* We support JavaScript (NodeJS v22) or Python (v3.13).
154
+
* You may use the following environment variables already set in the execution context: {{envVars}}
155
+
* Use external dependencies freely from NPM or PyPI. You should import them as usually.
156
+
* If package name is different from the import sentence, add an anotation for us to detect them (\`// @add-package package_name\` (javascript) or \`# @add-package package_name\` (python)).
157
+
* When possible, use binary packages to avoid compilation issues.
158
+
* Include debugging logs (\`console.log()\` in javascript or \`print()\` in python) if necessary for execution tracking and error debugging.
159
+
* Do not catch errors, let them fail the execution.
160
+
* Follow the required script structure based on the chosen language:
161
+
162
+
---------------------------------
163
+
JavaScript
164
+
----------
165
+
// @add-package package_name_1
166
+
const package_name_1 = require("package_name_1");
167
+
// @add-package package_name_2
168
+
const package_name_2 = require("package_name_2");
169
+
170
+
async function main() {
171
+
// The generated code should go here
172
+
return {"success": true, "data": result}
173
+
}
174
+
175
+
module.exports = { main }
176
+
---------------------------------
177
+
178
+
---------------------------------
179
+
Python
180
+
------
181
+
# @add-package package_name_1
182
+
import package_name_1
183
+
# @add-package package_name_2
184
+
from package_name_2.module import Module
185
+
186
+
def main():
187
+
# The generated code should go here
188
+
return {"success": True, "data": result}
189
+
190
+
---------------------------------
191
+
192
+
Important: The response should only contain the script to be executed by `python` or `node` and follow the exact structure above. Do not include any explanations neither enclosing annotations.
0 commit comments