Skip to content

Commit 30b49ca

Browse files
committed
Add aider example
1 parent 093a1b5 commit 30b49ca

File tree

11 files changed

+120
-1122
lines changed

11 files changed

+120
-1122
lines changed

Dockerfile renamed to Dockerfile.local

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -14,12 +14,10 @@ RUN useradd jovyan -d /home/jovyan -m -p 0049e6b11c44d4b00006eb820983a7a76c84a12
1414
mkdir -p /home/jovyan/work
1515

1616
COPY ./jupyter_server_config.py /home/jovyan/.jupyter/jupyter_server_config.py
17-
18-
COPY ./L2 /home/jovyan/work/L2
19-
COPY ./L3 /home/jovyan/work/L3
17+
COPY ./L1 /home/jovyan/work/L1
2018

2119
RUN chown -R jovyan:jovyan -R /home/jovyan
2220
RUN chown -R jovyan:jovyan -R /home/jovyan/work
2321

2422
USER jovyan
25-
CMD ["bash", "-c", "source /etc/bash.bashrc && jupyter notebook --no-browser"]
23+
CMD ["jupyter", "lab"]
Lines changed: 49 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,49 @@
1+
{
2+
"cells": [
3+
{
4+
"cell_type": "code",
5+
"execution_count": null,
6+
"id": "c34b3cbd-4745-4f0b-a18b-18d9e06d30fa",
7+
"metadata": {},
8+
"outputs": [],
9+
"source": [
10+
"from openai import OpenAI\n",
11+
"client = OpenAI()\n",
12+
"response = client.chat.completions.create(\n",
13+
" model=\"gpt-4o-mini\",\n",
14+
" messages=[{\"role\": \"user\", \"content\": \"What is Python?\"}]\n",
15+
")\n",
16+
"print(response.choices[0].message.content)"
17+
]
18+
},
19+
{
20+
"cell_type": "code",
21+
"execution_count": null,
22+
"id": "0a1d4923-9b0b-477d-b2cb-5b649b7a8184",
23+
"metadata": {},
24+
"outputs": [],
25+
"source": []
26+
}
27+
],
28+
"metadata": {
29+
"kernelspec": {
30+
"display_name": "Python 3 (ipykernel)",
31+
"language": "python",
32+
"name": "python3"
33+
},
34+
"language_info": {
35+
"codemirror_mode": {
36+
"name": "ipython",
37+
"version": 3
38+
},
39+
"file_extension": ".py",
40+
"mimetype": "text/x-python",
41+
"name": "python",
42+
"nbconvert_exporter": "python",
43+
"pygments_lexer": "ipython3",
44+
"version": "3.12.2"
45+
}
46+
},
47+
"nbformat": 4,
48+
"nbformat_minor": 5
49+
}

L1/test.ipynb

Lines changed: 49 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,49 @@
1+
{
2+
"cells": [
3+
{
4+
"cell_type": "code",
5+
"execution_count": null,
6+
"id": "c34b3cbd-4745-4f0b-a18b-18d9e06d30fa",
7+
"metadata": {},
8+
"outputs": [],
9+
"source": [
10+
"from openai import OpenAI\n",
11+
"client = OpenAI()\n",
12+
"response = client.chat.completions.create(\n",
13+
" model=\"gpt-4o-mini\",\n",
14+
" messages=[{\"role\": \"user\", \"content\": \"What is Python?\"}]\n",
15+
")\n",
16+
"print(response.choices[0].message.content)"
17+
]
18+
},
19+
{
20+
"cell_type": "code",
21+
"execution_count": null,
22+
"id": "0a1d4923-9b0b-477d-b2cb-5b649b7a8184",
23+
"metadata": {},
24+
"outputs": [],
25+
"source": []
26+
}
27+
],
28+
"metadata": {
29+
"kernelspec": {
30+
"display_name": "Python 3 (ipykernel)",
31+
"language": "python",
32+
"name": "python3"
33+
},
34+
"language_info": {
35+
"codemirror_mode": {
36+
"name": "ipython",
37+
"version": 3
38+
},
39+
"file_extension": ".py",
40+
"mimetype": "text/x-python",
41+
"name": "python",
42+
"nbconvert_exporter": "python",
43+
"pygments_lexer": "ipython3",
44+
"version": "3.12.2"
45+
}
46+
},
47+
"nbformat": 4,
48+
"nbformat_minor": 5
49+
}

0 commit comments

Comments
 (0)