Skip to content

Commit 6fb34ba

Browse files
committed
Do not use LLMs for code generation
1 parent ff0c6fe commit 6fb34ba

File tree

5 files changed

+42
-168
lines changed

5 files changed

+42
-168
lines changed

.cursor/rules/generators.mdc

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
---
2+
description:
3+
globs:
4+
alwaysApply: true
5+
---
6+
# Code Examples Generators
7+
8+
All code generators should follow the next rules:
9+
10+
1. They don't produce code with comments.
11+
2. They should generate idiomatic code for their target lanuage.
12+
3. The should not try to extract data from response, but in the code example, the response variable should be the last one.
13+
4. They should generate compact and elegant code.

README.md

Lines changed: 2 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -19,8 +19,8 @@ Using the library is as easy as:
1919
import { generateCode } from "requestcodegen";
2020

2121
const clojureCodeExample = generateCode(
22-
{ url: "http://example.com", method: "POST" },
23-
CodeTarget.Clojure
22+
{ url: "http://example.com", method: "POST" },
23+
CodeTarget.Clojure
2424
);
2525
```
2626

@@ -32,12 +32,6 @@ To build and publish the library:
3232
2. Run `npm run prepare`.
3333
3. Run `npm publish`.
3434

35-
## Generate code
36-
37-
```shell
38-
OPENAI_MODEL=<model> OPENAI_BASE_URL="<OpenAI API base URL>" OPENAI_API_KEY="OpenAI API key" npm run generate src/generators
39-
```
40-
4135
## Code Examples
4236

4337
Check out examples of generated code in the [examples.md](examples.md) file.

package-lock.json

Lines changed: 25 additions & 4 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@
1515
"types": "dist/@types/generator.d.ts",
1616
"devDependencies": {
1717
"@jest/globals": "^29.7.0",
18+
"@types/jest": "^29.5.14",
1819
"@types/node": "^17.0.40",
1920
"jest": "^29.7.0",
2021
"openai": "^4.24.1",
@@ -29,4 +30,4 @@
2930
"build": "./node_modules/typescript/bin/tsc",
3031
"prepare": "npm run build"
3132
}
32-
}
33+
}

src/scripts/generate.ts

Lines changed: 0 additions & 155 deletions
This file was deleted.

0 commit comments

Comments
 (0)