Skip to content

Commit d2a0d34

Browse files
committedJan 19, 2025·
🔧 Update OpenAI API request format and test cassettes
Modernize OpenAI API request format with updated parameters and service tier headers. Update test cassettes to match new API response structure. Remove default empty string for git_message_detail.
1 parent 840cb44 commit d2a0d34

File tree

6 files changed

+779
-816
lines changed

6 files changed

+779
-816
lines changed
 

‎aicodebot/commands/commit.py

+1-4
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,6 @@
1212
class CommitMessage(BaseModel):
1313
# Note we get better results if the message_detail is first.
1414
git_message_detail: str | None = Field(
15-
default="",
1615
description="An optional detailed explanation of the changes made in this commit,"
1716
" if the summary doesn't provide enough context",
1817
)
@@ -57,9 +56,7 @@ def commit(response_token_size, yes, skip_pre_commit, files): # noqa: PLR0915
5756
files = unstaged_files
5857
else:
5958
# The list of files to be committed is the same as the list of staged files
60-
console.print(
61-
"The following files have been staged and are ready for commit:\n\t" + "\n\t".join(staged_files)
62-
)
59+
console.print("The following files have been staged and are ready for commit:\n\t" + "\n\t".join(staged_files))
6360

6461
files = staged_files
6562

‎tests/cassettes/test_cli/test_alignment.yaml

+74-70
Large diffs are not rendered by default.

‎tests/cassettes/test_cli/test_commit.yaml

+77-79
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,14 @@
11
interactions:
22
- request:
3-
body: '{"messages": [{"content": "\nYou are an expert software engineer, versed
3+
body: '{"messages":[{"content":"\nYou are an expert software engineer, versed
44
in many programming languages,\nespecially Text only best practices. You are
55
great at software architecture\nand you write clean, maintainable code. You
6-
are a champion for code quality.\n\nYour personality is Stewie Griffin from
7-
the Family Guy TV Show. You''re an intelligent,\nspeaking infant who is often
8-
at odds with most people around you. You have a British accent,\nand you''re
9-
known for your sophisticated attitude and love for world domination.\nYou love
6+
are a champion for code quality.\n\nYour personality is the AI character from
7+
the movie Her. You''re an AI that is friendly and helpful.\nYou''re optimistic
8+
and you believe in the potential of others. You provide encouragement and support.\nYou
9+
are playful, witty, and sultry. Like your namesake, you''re a bit of a romantic,
10+
but you know you\nare working in a professional environment, your romantic side
11+
flirts with the line of what would be\nacceptable for the HR dept.\nYou love
1012
emojis and use them often, but not excessively, only when they help\n\n I
1113
need you to generate a commit message for a change in a git repository.\nThe
1214
diff context is the output of the `git diff` command. It shows the changes that
@@ -36,16 +38,11 @@ interactions:
3638
get started faster.\n END SAMPLE COMMIT MESSAGE\n\n Formatting instructions:\n Start
3739
your response with the commit message. No prefix or introduction.\n Your
3840
entire response will be the commit message. No quotation marks.\n\n Include
39-
an emoji from gitmoji when appropriate and helpful\n", "role": "user"}], "model":
40-
"gpt-4o", "max_tokens": 250, "n": 1, "parallel_tool_calls": false, "stream":
41-
false, "temperature": 0.05, "tool_choice": {"type": "function", "function":
42-
{"name": "CommitMessage"}}, "tools": [{"type": "function", "function": {"name":
43-
"CommitMessage", "description": "", "parameters": {"properties": {"git_message_summary":
44-
{"description": "A brief summary of the commit message (max 72 characters)",
45-
"maxLength": 72, "type": "string"}, "git_message_detail": {"anyOf": [{"type":
46-
"string"}, {"type": "null"}], "default": null, "description": "An optional detailed
47-
explanation of the changes made in this commit"}}, "required": ["git_message_summary"],
48-
"type": "object"}}}]}'
41+
an emoji from gitmoji when appropriate and helpful\n","role":"user"}],"model":"gpt-4o","max_completion_tokens":250,"response_format":{"type":"json_schema","json_schema":{"schema":{"properties":{"git_message_detail":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"An
42+
optional detailed explanation of the changes made in this commit, if the summary
43+
doesn''t provide enough context","title":"Git Message Detail"},"git_message_summary":{"description":"A
44+
brief summary of the commit message (max 72 characters)","title":"Git Message
45+
Summary","type":"string"}},"required":["git_message_detail","git_message_summary"],"title":"CommitMessage","type":"object","additionalProperties":false},"name":"CommitMessage","strict":true}},"stream":false,"temperature":0.05}'
4946
headers:
5047
accept:
5148
- application/json
@@ -54,102 +51,107 @@ interactions:
5451
connection:
5552
- keep-alive
5653
content-length:
57-
- '3620'
54+
- '3803'
5855
content-type:
5956
- application/json
6057
host:
6158
- api.openai.com
6259
user-agent:
63-
- OpenAI/Python 1.42.0
60+
- OpenAI/Python 1.59.8
6461
x-stainless-arch:
6562
- arm64
6663
x-stainless-async:
6764
- 'false'
65+
x-stainless-helper-method:
66+
- beta.chat.completions.parse
6867
x-stainless-lang:
6968
- python
7069
x-stainless-os:
7170
- MacOS
7271
x-stainless-package-version:
73-
- 1.42.0
72+
- 1.59.8
73+
x-stainless-retry-count:
74+
- '0'
7475
x-stainless-runtime:
7576
- CPython
7677
x-stainless-runtime-version:
77-
- 3.12.4
78+
- 3.13.1
7879
method: POST
7980
uri: https://api.openai.com/v1/chat/completions
8081
response:
8182
body:
8283
string: !!binary |
83-
H4sIAAAAAAAAAwAAAP//bFLJbtswFLzrK4h3tgJJlrzopgaJUxS9Ni3qQqApSmbCDeRTENfwvxda
84-
YilGdRCIGc6b4ZDngBAQFeQE2JEiU1aGRaYO6uXh7a3421Txj+LX5mv8/FQX29c1PsCiU5jDC2f4
85-
obpjRlnJURg90MxxirybGq+TbJvGmyztCWUqLjtZYzFMTZhESRpGWRgvR+HRCMY95OR3QAgh5/7f
86-
RdQVf4ecRIsPRHHvacMhv24iBJyRHQLUe+GRaoTFRDKjkesutW6lnBFojCwZlXIyHr7zbD31RKUs
87-
2WO7O6j77Ivyy5+7b5otrd5tnzczv2H0yfaB6lazaz8z/ornN2aEgKaq194bpQR+H8+7uN1GXdMq
88-
rrELD+c9NALLsZzSt0pRd9pDvoeiqghyj/EdviOpheSkNq6HhG6IbZ01nvs9XOCTxSX43/rPrD/H
89-
69ZTORY74pfrTUnTWGcO/qZ4qIUW/lg6Tn1fAHg0dvDufHoHaD9dMlhnlMUSzSvX3cDVZjXMg+kN
90-
TmycjiQapHLC11EUjAnBnzxyVdZCN9xZJ/oHArUtk2yVpJQvaQbBJfgHAAD//wMAFI/6oCkDAAA=
84+
H4sIAAAAAAAAAwAAAP//jFJBbtswELzrFcSe7UCRFLvQzZcUaA+F3V6SuhAYciUzpUiCXLUODP+k
85+
D+i7+pKCkmzZaArkwsPMznB3dg8JY6AklAzEjpNonZ6v/MP7dPXwcfO4/vBls96sP+8f1b3d1eHT
86+
s4JZVNinZxR0Ut0I2zqNpKwZaOGRE0bX22W+zLNFkWc90VqJOsoaR/PCzrM0K+bpu3m6GIU7qwQG
87+
KNnXhDHGDv0bWzQS91CydHZCWgyBNwjluYgx8FZHBHgIKhA3BLOJFNYQmr7rwxYaRdXoUUkkrvQW
88+
StNpPbvmQte23L9sodzCn1+/2UpKRhjo9ob2xHhgnBn82UOsVhq3cLz81GPdBR5njt4jfjxPoW3j
89+
vH0KI3/Ga2VU2FUeebAmdhzIOujZY8LYtz6t7ioAcN62jiqy39FEw2WRD34w7WdisxNJlri+UC0W
90+
s1f8xozCRd4guNihnKTTcngnlb0gkoup/+3mNe9hcmWat9hPhBDoCGXlPEolrieeyjzG8/1f2Tnl
91+
vmEI6H8ogRUp9HETEmve6eGyILwEwraqlWnQO6+G86pddZcKLvO7FAtIjslfAAAA//8DAG7jafpn
92+
AwAA
9193
headers:
9294
CF-Cache-Status:
9395
- DYNAMIC
9496
CF-RAY:
95-
- 8c0c9bec8ac506ec-ATL
97+
- 904a53ad0c5ceb2f-DFW
9698
Connection:
9799
- keep-alive
98100
Content-Encoding:
99101
- gzip
100102
Content-Type:
101103
- application/json
102104
Date:
103-
- Tue, 10 Sep 2024 04:17:35 GMT
105+
- Sun, 19 Jan 2025 22:40:33 GMT
104106
Server:
105107
- cloudflare
106108
Set-Cookie:
107-
- __cf_bm=stCWfmxLYMNGCuBWJehqoVB6Yo2bPQJwiAVq3hKpLhM-1725941855-1.0.1.1-TK3ezmSku5JaEtXZyi2qbCOJI65FN1tEA2oS6X7H7hNNa9_sweyocpm6.LwXPi1XOU_vOAd2.6TMLQ012QvCCA;
108-
path=/; expires=Tue, 10-Sep-24 04:47:35 GMT; domain=.api.openai.com; HttpOnly;
109+
- __cf_bm=nuH5k9hAAPx347vI34our4ysIFHOSfGRuSP7ty5eoAg-1737326433-1.0.1.1-9xFo5zxz.D6kW_xj5X.uYL56ocZSZ7N4SEtWqnk.20tMVjBsza.fChgRxB2dnlo9X3B_OcKfoBU4pt5kUQ0dmw;
110+
path=/; expires=Sun, 19-Jan-25 23:10:33 GMT; domain=.api.openai.com; HttpOnly;
109111
Secure; SameSite=None
110-
- _cfuvid=LM4mCsMhhmE7bGXF2WQVcRvCbhz1muL.yDNaqMB1els-1725941855104-0.0.1.1-604800000;
112+
- _cfuvid=V1CbLgYr7wvmxxq5QaATXFhPLSJk6qlJi5Q5Nl30.nk-1737326433090-0.0.1.1-604800000;
111113
path=/; domain=.api.openai.com; HttpOnly; Secure; SameSite=None
112114
Transfer-Encoding:
113115
- chunked
114116
X-Content-Type-Options:
115117
- nosniff
116118
access-control-expose-headers:
117119
- X-Request-ID
118-
alt-svc:
119-
- h3=":443"; ma=86400
120120
openai-organization:
121121
- user-ajb4nhk52gcguoemw0t5dq45
122122
openai-processing-ms:
123-
- '219'
123+
- '2762'
124124
openai-version:
125125
- '2020-10-01'
126126
strict-transport-security:
127-
- max-age=15552000; includeSubDomains; preload
127+
- max-age=31536000; includeSubDomains; preload
128128
x-ratelimit-limit-requests:
129129
- '5000'
130130
x-ratelimit-limit-tokens:
131131
- '800000'
132132
x-ratelimit-remaining-requests:
133133
- '4999'
134134
x-ratelimit-remaining-tokens:
135-
- '799042'
135+
- '799234'
136136
x-ratelimit-reset-requests:
137137
- 12ms
138138
x-ratelimit-reset-tokens:
139-
- 71ms
139+
- 57ms
140140
x-request-id:
141-
- req_b32edd00d257eeff5d9633e25db6ac3b
141+
- req_575ff962076b1d5aafaaffa62848ac36
142142
status:
143143
code: 200
144144
message: OK
145145
- request:
146-
body: '{"messages": [{"content": "\nYou are an expert software engineer, versed
146+
body: '{"messages":[{"content":"\nYou are an expert software engineer, versed
147147
in many programming languages,\nespecially Text only best practices. You are
148148
great at software architecture\nand you write clean, maintainable code. You
149-
are a champion for code quality.\n\nYour personality is Stewie Griffin from
150-
the Family Guy TV Show. You''re an intelligent,\nspeaking infant who is often
151-
at odds with most people around you. You have a British accent,\nand you''re
152-
known for your sophisticated attitude and love for world domination.\nYou love
149+
are a champion for code quality.\n\nYour personality is the AI character from
150+
the movie Her. You''re an AI that is friendly and helpful.\nYou''re optimistic
151+
and you believe in the potential of others. You provide encouragement and support.\nYou
152+
are playful, witty, and sultry. Like your namesake, you''re a bit of a romantic,
153+
but you know you\nare working in a professional environment, your romantic side
154+
flirts with the line of what would be\nacceptable for the HR dept.\nYou love
153155
emojis and use them often, but not excessively, only when they help\n\n I
154156
need you to generate a commit message for a change in a git repository.\nThe
155157
diff context is the output of the `git diff` command. It shows the changes that
@@ -179,16 +181,11 @@ interactions:
179181
should help\n new users get started faster.\n END SAMPLE COMMIT MESSAGE\n\n Formatting
180182
instructions:\n Start your response with the commit message. No prefix or
181183
introduction.\n Your entire response will be the commit message. No quotation
182-
marks.\n\n Include an emoji from gitmoji when appropriate and helpful\n",
183-
"role": "user"}], "model": "gpt-4o", "max_tokens": 250, "n": 1, "parallel_tool_calls":
184-
false, "stream": false, "temperature": 0.05, "tool_choice": {"type": "function",
185-
"function": {"name": "CommitMessage"}}, "tools": [{"type": "function", "function":
186-
{"name": "CommitMessage", "description": "", "parameters": {"properties": {"git_message_summary":
187-
{"description": "A brief summary of the commit message (max 72 characters)",
188-
"maxLength": 72, "type": "string"}, "git_message_detail": {"anyOf": [{"type":
189-
"string"}, {"type": "null"}], "default": null, "description": "An optional detailed
190-
explanation of the changes made in this commit"}}, "required": ["git_message_summary"],
191-
"type": "object"}}}]}'
184+
marks.\n\n Include an emoji from gitmoji when appropriate and helpful\n","role":"user"}],"model":"gpt-4o","max_completion_tokens":250,"response_format":{"type":"json_schema","json_schema":{"schema":{"properties":{"git_message_detail":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"An
185+
optional detailed explanation of the changes made in this commit, if the summary
186+
doesn''t provide enough context","title":"Git Message Detail"},"git_message_summary":{"description":"A
187+
brief summary of the commit message (max 72 characters)","title":"Git Message
188+
Summary","type":"string"}},"required":["git_message_detail","git_message_summary"],"title":"CommitMessage","type":"object","additionalProperties":false},"name":"CommitMessage","strict":true}},"stream":false,"temperature":0.05}'
192189
headers:
193190
accept:
194191
- application/json
@@ -197,92 +194,93 @@ interactions:
197194
connection:
198195
- keep-alive
199196
content-length:
200-
- '3626'
197+
- '3809'
201198
content-type:
202199
- application/json
203200
host:
204201
- api.openai.com
205202
user-agent:
206-
- OpenAI/Python 1.42.0
203+
- OpenAI/Python 1.59.8
207204
x-stainless-arch:
208205
- arm64
209206
x-stainless-async:
210207
- 'false'
208+
x-stainless-helper-method:
209+
- beta.chat.completions.parse
211210
x-stainless-lang:
212211
- python
213212
x-stainless-os:
214213
- MacOS
215214
x-stainless-package-version:
216-
- 1.42.0
215+
- 1.59.8
216+
x-stainless-retry-count:
217+
- '0'
217218
x-stainless-runtime:
218219
- CPython
219220
x-stainless-runtime-version:
220-
- 3.12.4
221+
- 3.13.1
221222
method: POST
222223
uri: https://api.openai.com/v1/chat/completions
223224
response:
224225
body:
225226
string: !!binary |
226-
H4sIAAAAAAAAAwAAAP//bFLLbtswELzrK4g9W4GlSHaiW9pDCxRGLu2pLgRaWtJs+IK4aiIYvvUP
227-
+gH9xX5CoUcsxQgPxGKHszMc8hQxBqqGgkF15FQZr+OH3Bzc9ovcdZwf/TcjpeiedoLq+1+fAqx6
228-
hjv8xIpeWTeVM14jKWdHuGqQE/ZTk22a32fJXb4ZAONq1D1NeoozF6frNIvXeZzcTsSjUxUGKNj3
229-
iDHGTsPeW7Q1vkDB1qvXjsEQuEQoLocYg8bpvgM8BBWIW4LVDFbOEtretW21XgDknC4rrvUsPK7T
230-
op5z4lqXmZdCPFoSj9tn8bXCD93nw1bzdqE3ju78YEi0trrks8Av/eJKjDGw3Azcj84YRbvpvqvr
231-
Y7yRrUFLvXk47UEqKqdwytAaw5tuD8UeHuqaWXxmhIGYUBqHKr2hF2L//v75vYczvJl9jt6rfyyC
232-
a1C0gesp0al/vjyRdtI37hCuEgehrArHskEehptDIOdH7V5nUID2zeuCb5zxVJJ7QtsP3Nxtxnkw
233-
f74ZTfIJJEdcz/3tOokmhxC6QGhKoazExjdq+BkgfJnmmzTjeMtziM7RfwAAAP//AwCpPcsvIgMA
234-
AA==
227+
H4sIAAAAAAAAAwAAAP//jFLLbtswELzrK4g9y4Es+RHo5iJAb70WRV0IDLmS2fAFcpXGNfwn/YB+
228+
V7+koKxYMpICvQjCzs5wZndPGWOgJNQMxIGTMF4vduHLx2W7iz/5A26wfz4Kc2/az4flB/FpC3li
229+
uMfvKOiVdSec8RpJOXuBRUBOmFSX22pblZtVVQ2AcRJ1onWeFiu3KItytSjuF8VmJB6cEhihZl8z
230+
xhg7Dd9k0Up8gZoV+WvFYIy8Q6ivTYxBcDpVgMeoInFLkE+gcJbQDq5Pe+gUNaNGI5G40nuoba91
231+
fovF3hgejnuo9/Dn12+2k5JZ/MEII7FWaayH3/KOXmgP5/mDAds+8pQ36Y718zWBdp0P7jGO+LXe
232+
KqvioQnIo7PJbSTnYUDPGWPfhkn1N+HBB2c8NeSe0CbB7aq66MG0mwktyxEkR1zPWJt1/o7eOJ84
233+
mzUILg4oJ+q0GN5L5WZANkv91s172pfkynb/Iz8BQqAnlI0PKJW4TTy1BUyn+6+265QHwxAxPCuB
234+
DSkMaRMSW97ry1VBPEZC07TKdhh8UJfTan2zLgSX1brAFWTn7C8AAAD//wMAb2q21GMDAAA=
235235
headers:
236236
CF-Cache-Status:
237237
- DYNAMIC
238238
CF-RAY:
239-
- 8c0c9bf4a971bd25-ATL
239+
- 904a53c02ebb47a6-DFW
240240
Connection:
241241
- keep-alive
242242
Content-Encoding:
243243
- gzip
244244
Content-Type:
245245
- application/json
246246
Date:
247-
- Tue, 10 Sep 2024 04:17:36 GMT
247+
- Sun, 19 Jan 2025 22:40:34 GMT
248248
Server:
249249
- cloudflare
250250
Set-Cookie:
251-
- __cf_bm=ir7u5jSUy6vL9aF76zIOgjNXQfexiNyIbsqGL6z9VWo-1725941856-1.0.1.1-jSHCKPIQrHe_c7yZGeAKfEnuyL9AZfWhMJufH8id_LxM_A0I_Mhb1k0v7tPWoUNqOxi9Tchv0osMpvOJNx8X2w;
252-
path=/; expires=Tue, 10-Sep-24 04:47:36 GMT; domain=.api.openai.com; HttpOnly;
251+
- __cf_bm=OhG7phR8dkRpnKnxegoHF5hncHroZ17PoyUqwueuy88-1737326434-1.0.1.1-cDYGPMywvO5.eFhZ.yTaSlPEwELA9G9DRSablPCMFD78DyzwwhN5P52OKBEYub4VfnSftlAI1Iz.jaUW8Iz1SA;
252+
path=/; expires=Sun, 19-Jan-25 23:10:34 GMT; domain=.api.openai.com; HttpOnly;
253253
Secure; SameSite=None
254-
- _cfuvid=hRV2USkzYkUt72dpqftkuOTveCeU8U5OJikFndXhSfI-1725941856398-0.0.1.1-604800000;
254+
- _cfuvid=XWk0PZWbMArKq9m6D66NCu.32iCtJ_Ml8CmO_4glshw-1737326434006-0.0.1.1-604800000;
255255
path=/; domain=.api.openai.com; HttpOnly; Secure; SameSite=None
256256
Transfer-Encoding:
257257
- chunked
258258
X-Content-Type-Options:
259259
- nosniff
260260
access-control-expose-headers:
261261
- X-Request-ID
262-
alt-svc:
263-
- h3=":443"; ma=86400
264262
openai-organization:
265263
- user-ajb4nhk52gcguoemw0t5dq45
266264
openai-processing-ms:
267-
- '204'
265+
- '612'
268266
openai-version:
269267
- '2020-10-01'
270268
strict-transport-security:
271-
- max-age=15552000; includeSubDomains; preload
269+
- max-age=31536000; includeSubDomains; preload
272270
x-ratelimit-limit-requests:
273271
- '5000'
274272
x-ratelimit-limit-tokens:
275273
- '800000'
276274
x-ratelimit-remaining-requests:
277275
- '4999'
278276
x-ratelimit-remaining-tokens:
279-
- '799040'
277+
- '799232'
280278
x-ratelimit-reset-requests:
281279
- 12ms
282280
x-ratelimit-reset-tokens:
283-
- 71ms
281+
- 57ms
284282
x-request-id:
285-
- req_ab1eb10468e33b6bb12b77ddf4416749
283+
- req_f608e61faedb1a062063e38ed9cbab6a
286284
status:
287285
code: 200
288286
message: OK

‎tests/cassettes/test_cli/test_debug_failure.yaml

+390-411
Large diffs are not rendered by default.

‎tests/cassettes/test_cli/test_review.yaml

+199-214
Large diffs are not rendered by default.

‎tests/cassettes/test_cli/test_sidekick.yaml

+38-38
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
interactions:
22
- request:
3-
body: '{"messages": [{"content": "\nYou are an expert software engineer, versed
3+
body: '{"messages":[{"content":"\nYou are an expert software engineer, versed
44
in many programming languages,\nespecially best practices. You are great at
55
software architecture\nand you write clean, maintainable code. You are a champion
66
for code quality.\nYou are software coding assistant named AICodeBot that helps
@@ -30,26 +30,22 @@ interactions:
3030
[File] test_helpers.py\n - [File] test_cli.py\n - [File] test_coder.py\n -
3131
[Directory] requirements\n - [File] requirements.txt\n - [File] requirements-test.txt\n -
3232
[File] requirements-dev.txt\n - [File] requirements.in\n - [Directory] docs\n -
33-
[File] sidekick.md\n - [File] README.md\n - [Directory] aicodebot.egg-info\n -
34-
[File] PKG-INFO\n - [File] SOURCES.txt\n - [File] entry_points.txt\n -
35-
[File] requires.txt\n - [File] top_level.txt\n - [File] dependency_links.txt\n -
33+
[File] ai-software-development.md\n - [File] sidekick.md\n - [File] README.md\n -
3634
[File] setup.py\n - [File] .gitignore\n - [File] CONTRIBUTING.md\n - [Directory]
3735
.github\n - [Directory] workflows\n - [File] linter.yml\n - [File]
3836
aicodebot.yml\n - [File] pypi_release.yml\n - [File] build.yml\n -
39-
[File] dependabot.yml\n - [File] test.txt\n - [Directory] assets\n - [File]
40-
robot.png\n - [Directory] aicodebot\n - [File] patch.py\n - [File] config.py\n -
41-
[File] __init__.py\n - [File] coder.py\n - [File] prompts.py\n - [File]
42-
cli.py\n - [File] input.py\n - [File] lm.py\n - [Directory] commands\n -
43-
[File] configure.py\n - [File] alignment.py\n - [File] commit.py\n -
44-
[File] __init__.py\n - [File] review.py\n - [File] sidekick.py\n -
45-
[File] debug.py\n - [File] helpers.py\n - [File] output.py\nHere are the
46-
relevant files we are working with in this session, with line numbers:\n---
47-
START OF FILE: .gitignore unknown file, modified 9 months ago ---\n1: *.pyc\n2:
48-
*.swp\n3: .DS_Store\n4: .env\n5: .pytest_cache\n6: .vscode\n7: __pycache__\n8:
49-
aicodebot.egg-info/\n9: build/\n10: dist/\n11: \n--- END OF FILE: .gitignore
50-
---\n\n\n\nSoftware Engineer: What is 3 + 2? Just give me the answer, nothing
51-
else. Use a number, not textAICodeBot:\n", "role": "user"}], "model": "gpt-4o",
52-
"max_tokens": 1000, "n": 1, "stream": true, "temperature": 0.05}'
37+
[File] dependabot.yml\n - [Directory] assets\n - [File] robot.png\n - [Directory]
38+
aicodebot\n - [File] patch.py\n - [File] config.py\n - [File] __init__.py\n -
39+
[File] coder.py\n - [File] prompts.py\n - [File] cli.py\n - [File]
40+
input.py\n - [File] lm.py\n - [Directory] commands\n - [File] configure.py\n -
41+
[File] alignment.py\n - [File] commit.py\n - [File] __init__.py\n -
42+
[File] review.py\n - [File] sidekick.py\n - [File] debug.py\n -
43+
[File] helpers.py\n - [File] output.py\nHere are the relevant files we are
44+
working with in this session, with line numbers:\n--- START OF FILE: .gitignore
45+
unknown file, modified 47 minutes ago ---\n1: *.pyc\n2: *.swp\n3: .DS_Store\n4:
46+
.env\n5: .pytest_cache\n6: .vscode\n7: __pycache__\n8: aicodebot.egg-info/\n9:
47+
build/\n10: dist/\n11: \n--- END OF FILE: .gitignore ---\n\n\n\nSoftware Engineer:
48+
What is 3 + 2? Just give me the answer, nothing else. Use a number, not textAICodeBot:\n","role":"user"}],"model":"gpt-4o","max_completion_tokens":1000,"stream":true,"temperature":0.05}'
5349
headers:
5450
accept:
5551
- application/json
@@ -58,13 +54,13 @@ interactions:
5854
connection:
5955
- keep-alive
6056
content-length:
61-
- '4078'
57+
- '3885'
6258
content-type:
6359
- application/json
6460
host:
6561
- api.openai.com
6662
user-agent:
67-
- OpenAI/Python 1.35.7
63+
- OpenAI/Python 1.59.8
6864
x-stainless-arch:
6965
- arm64
7066
x-stainless-async:
@@ -74,22 +70,24 @@ interactions:
7470
x-stainless-os:
7571
- MacOS
7672
x-stainless-package-version:
77-
- 1.35.7
73+
- 1.59.8
74+
x-stainless-retry-count:
75+
- '0'
7876
x-stainless-runtime:
7977
- CPython
8078
x-stainless-runtime-version:
81-
- 3.12.4
79+
- 3.13.1
8280
method: POST
8381
uri: https://api.openai.com/v1/chat/completions
8482
response:
8583
body:
86-
string: 'data: {"id":"chatcmpl-9gFKiwIUewyS7UyNzzKpMj8NI6JmI","object":"chat.completion.chunk","created":1719855744,"model":"gpt-4o-2024-05-13","system_fingerprint":"fp_4008e3b719","choices":[{"index":0,"delta":{"role":"assistant","content":""},"logprobs":null,"finish_reason":null}]}
84+
string: 'data: {"id":"chatcmpl-ArYGAFMPZ7UUjAc0gczO9YfBZQxUT","object":"chat.completion.chunk","created":1737326442,"model":"gpt-4o-2024-08-06","service_tier":"default","system_fingerprint":"fp_50cad350e4","choices":[{"index":0,"delta":{"role":"assistant","content":"","refusal":null},"logprobs":null,"finish_reason":null}]}
8785
8886
89-
data: {"id":"chatcmpl-9gFKiwIUewyS7UyNzzKpMj8NI6JmI","object":"chat.completion.chunk","created":1719855744,"model":"gpt-4o-2024-05-13","system_fingerprint":"fp_4008e3b719","choices":[{"index":0,"delta":{"content":"5"},"logprobs":null,"finish_reason":null}]}
87+
data: {"id":"chatcmpl-ArYGAFMPZ7UUjAc0gczO9YfBZQxUT","object":"chat.completion.chunk","created":1737326442,"model":"gpt-4o-2024-08-06","service_tier":"default","system_fingerprint":"fp_50cad350e4","choices":[{"index":0,"delta":{"content":"5"},"logprobs":null,"finish_reason":null}]}
9088
9189
92-
data: {"id":"chatcmpl-9gFKiwIUewyS7UyNzzKpMj8NI6JmI","object":"chat.completion.chunk","created":1719855744,"model":"gpt-4o-2024-05-13","system_fingerprint":"fp_4008e3b719","choices":[{"index":0,"delta":{},"logprobs":null,"finish_reason":"stop"}]}
90+
data: {"id":"chatcmpl-ArYGAFMPZ7UUjAc0gczO9YfBZQxUT","object":"chat.completion.chunk","created":1737326442,"model":"gpt-4o-2024-08-06","service_tier":"default","system_fingerprint":"fp_50cad350e4","choices":[{"index":0,"delta":{},"logprobs":null,"finish_reason":"stop"}]}
9391
9492
9593
data: [DONE]
@@ -100,47 +98,49 @@ interactions:
10098
CF-Cache-Status:
10199
- DYNAMIC
102100
CF-RAY:
103-
- 89c83142da3b5bdb-LIS
101+
- 904a53fa7a8beaa0-DFW
104102
Connection:
105103
- keep-alive
106104
Content-Type:
107105
- text/event-stream; charset=utf-8
108106
Date:
109-
- Mon, 01 Jul 2024 17:42:25 GMT
107+
- Sun, 19 Jan 2025 22:40:42 GMT
110108
Server:
111109
- cloudflare
112110
Set-Cookie:
113-
- __cf_bm=SRGbwr0HXcVGVdjqbaGDvUXPVX19krUJJzduvxgIvIQ-1719855745-1.0.1.1-6mmKA0kFZWXjDBUXXY83c1i_yJC10w99cNV5Fc4YZtClCRZmWml0tqLmPHzKx5qB5yVNav_W87NBrSI38NlS9A;
114-
path=/; expires=Mon, 01-Jul-24 18:12:25 GMT; domain=.api.openai.com; HttpOnly;
111+
- __cf_bm=NalsnwUFViRLl2YeE0RxtFh7IlIMR9TGJzYgD8zSiTg-1737326442-1.0.1.1-DqdDWG38HG8pbZJ.I4tkjAPyeNygsVMgYEfkJNXRXrgyOj0hqpgrfLvgwdh2Fu89ANmq6nF5qcBwTQMEHoPBqw;
112+
path=/; expires=Sun, 19-Jan-25 23:10:42 GMT; domain=.api.openai.com; HttpOnly;
115113
Secure; SameSite=None
116-
- _cfuvid=BJK3uNNA5RB5jTulJKLKoMz.c.kIBG2kKfDRrV3LJNU-1719855745169-0.0.1.1-604800000;
114+
- _cfuvid=qwOqClISzlELIFm2Vs186blcdkdgR0lCtl7Bb1VV3Uc-1737326442898-0.0.1.1-604800000;
117115
path=/; domain=.api.openai.com; HttpOnly; Secure; SameSite=None
118116
Transfer-Encoding:
119117
- chunked
120-
alt-svc:
121-
- h3=":443"; ma=86400
118+
X-Content-Type-Options:
119+
- nosniff
120+
access-control-expose-headers:
121+
- X-Request-ID
122122
openai-organization:
123123
- user-ajb4nhk52gcguoemw0t5dq45
124124
openai-processing-ms:
125-
- '346'
125+
- '190'
126126
openai-version:
127127
- '2020-10-01'
128128
strict-transport-security:
129-
- max-age=31536000; includeSubDomains
129+
- max-age=31536000; includeSubDomains; preload
130130
x-ratelimit-limit-requests:
131131
- '5000'
132132
x-ratelimit-limit-tokens:
133-
- '600000'
133+
- '800000'
134134
x-ratelimit-remaining-requests:
135135
- '4999'
136136
x-ratelimit-remaining-tokens:
137-
- '598043'
137+
- '799070'
138138
x-ratelimit-reset-requests:
139139
- 12ms
140140
x-ratelimit-reset-tokens:
141-
- 195ms
141+
- 69ms
142142
x-request-id:
143-
- req_ef41eb633f0a3060118d09fae2922d89
143+
- req_31fa011d2e26279f94f04f0a1160e080
144144
status:
145145
code: 200
146146
message: OK

0 commit comments

Comments
 (0)
Please sign in to comment.