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
## Prompt to use if you are asking LLM to write code
133
+
134
+
You can use the following prompt to ask LLM to write code that the YepCode Run SDK can execute.
135
+
136
+
You should replace the `{{task}}` and `{{envVars}}` placeholders with the actual task and environment variables names already set in your YepCode workspace.
137
+
138
+
```text
139
+
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.
140
+
141
+
The task to solve is:
142
+
143
+
=====
144
+
{{task}}
145
+
=====
146
+
147
+
* We support JavaScript (NodeJS v22) or Python (v3.13).
148
+
* You may use the following environment variables already set in the execution context: {{envVars}}
149
+
* Use external dependencies freely from NPM or PyPI. You should import them as usually.
150
+
* 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)).
151
+
* When possible, use binary packages to avoid compilation issues.
152
+
* Include debugging logs (\`console.log()\` in javascript or \`print()\` in python) if necessary for execution tracking and error debugging.
153
+
* Do not catch errors, let them fail the execution.
154
+
* Follow the required script structure based on the chosen language:
155
+
156
+
---------------------------------
157
+
JavaScript
158
+
----------
159
+
// @add-package package_name_1
160
+
const package_name_1 = require("package_name_1");
161
+
// @add-package package_name_2
162
+
const package_name_2 = require("package_name_2");
163
+
164
+
async function main() {
165
+
// The generated code should go here
166
+
return {"success": true, "data": result}
167
+
}
168
+
169
+
module.exports = { main }
170
+
---------------------------------
171
+
172
+
---------------------------------
173
+
Python
174
+
------
175
+
# @add-package package_name_1
176
+
import package_name_1
177
+
# @add-package package_name_2
178
+
from package_name_2.module import Module
179
+
180
+
def main():
181
+
# The generated code should go here
182
+
return {"success": True, "data": result}
183
+
184
+
---------------------------------
185
+
186
+
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