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: .github/CONTRIBUTING.md
+32-2Lines changed: 32 additions & 2 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -15,14 +15,44 @@ First of all, thank you for your interest in contributing to gpt-code-ui! We app
15
15
-[Commit Messages](#commit-messages)
16
16
-[Additional Resources](#additional-resources)
17
17
18
-
## Code of Conductcode
18
+
## Code of Conduct
19
19
20
20
All contributors are expected to adhere to our [Code of Conduct](CODE_OF_CONDUCT.md). Please read it before participating in the gpt-code-ui community.
21
21
22
22
## Getting Started
23
23
24
24
1. Fork the repository and clone it to your local machine.
25
-
2. Set up the development environment by following the instructions in the [README.md](https://github.com/ricklamers/gpt-code-ui/tree/main/README.md) file.
25
+
2. Set up the development environment as follows:
26
+
27
+
To install the package as an editable Python package run:
28
+
```sh
29
+
pip install -e .
30
+
```
31
+
32
+
To run the backend:
33
+
```sh
34
+
gptcode
35
+
```
36
+
37
+
To run the frontend in dev mode such that frontend code changes automatically update, set
38
+
the following environment variable such that the frontend knows where to
39
+
find the backend API server.
40
+
41
+
`export VITE_WEB_ADDRESS=http://localhost:8080`
42
+
43
+
Run the frontend in development mode (served by Vite):
44
+
```sh
45
+
cd frontend
46
+
npm run dev
47
+
```
48
+
49
+
The HMR/auto reloading version of the frontend can now be found at http://localhost:5173 (default Vite port)
50
+
51
+
Note, the frontend served at `http://localhost:8080` is stale comes from the static bundled files that can
52
+
be generated by running `make compile_frontend`.
53
+
54
+
With this setup, code changes to the Flask backend still require restarting `gptcode` (backend).
55
+
26
56
3. Explore the codebase, run tests, and verify that everything works as expected.
prompt=f"First, here is a history of what I asked you to do earlier. The actual prompt follows after ENDOFHISTORY. History:\n\n{message_buffer.get_string()}ENDOFHISTORY.\n\nWrite Python code that does the following: \n\n{user_prompt}\n\nNote, the code is going to be executed in a Jupyter Python kernel.\n\nLast instruction, and this is the most important, just return code. No other outputs, as your full response will directly be executed in the kernel. \n\nTeacher mode: if you want to give a download link, just print it as <a href='/download?file=INSERT_FILENAME_HERE'>Download file</a>. Replace INSERT_FILENAME_HERE with the actual filename. So just print that HTML to stdout. No actual downloading of files!"
61
+
prompt=f"""First, here is a history of what I asked you to do earlier.
62
+
The actual prompt follows after ENDOFHISTORY.
63
+
History:
64
+
{message_buffer.get_string()}
65
+
ENDOFHISTORY.
66
+
Write Python code, in a triple backtick Markdown code block, that does the following:
67
+
{user_prompt}
68
+
69
+
Notes:
70
+
First, think step by step what you want to do and write it down in English.
71
+
Then generate valid Python code in a code block
72
+
Make sure all code is valid - it be run in a Jupyter Python 3 kernel environment.
73
+
Define every variable before you use it.
74
+
For data munging, you can use
75
+
'numpy', # numpy==1.24.3
76
+
'dateparser' #dateparser==1.1.8
77
+
'pandas', # matplotlib==1.5.3
78
+
'geopandas' # geopandas==0.13.2
79
+
For pdf extraction, you can use
80
+
'PyPDF2', # PyPDF2==3.0.1
81
+
'pdfminer', # pdfminer==20191125
82
+
'pdfplumber', # pdfplumber==0.9.0
83
+
For data visualization, you can use
84
+
'matplotlib', # matplotlib==3.7.1
85
+
Be sure to generate charts with matplotlib. If you need geographical charts, use geopandas with the geopandas.datasets module.
86
+
If the user has just uploaded a file, focus on the file that was most recently uploaded (and optionally all previously uploaded files)
87
+
88
+
Teacher mode: if the code modifies or produces a file, end your output AFTER YOUR CODE BLOCK with a link to it as <a href='/download?file=INSERT_FILENAME_HERE'>Download file</a>. Replace INSERT_FILENAME_HERE with the actual filename. So just print that HTML to stdout at the end, AFTER your code block."""
0 commit comments