@@ -36,7 +36,7 @@ chat_completion = client.chat.completions.create(
36
36
" content" : " Say this is a test" ,
37
37
}
38
38
],
39
- model = " gpt-3.5-turbo " ,
39
+ model = " gpt-4o " ,
40
40
)
41
41
```
42
42
@@ -67,7 +67,7 @@ async def main() -> None:
67
67
" content" : " Say this is a test" ,
68
68
}
69
69
],
70
- model = " gpt-3.5-turbo " ,
70
+ model = " gpt-4o " ,
71
71
)
72
72
73
73
@@ -92,7 +92,7 @@ stream = client.chat.completions.create(
92
92
" content" : " Say this is a test" ,
93
93
}
94
94
],
95
- model = " gpt-3.5-turbo " ,
95
+ model = " gpt-4o " ,
96
96
stream = True ,
97
97
)
98
98
for chat_completion in stream:
@@ -113,7 +113,7 @@ stream = await client.chat.completions.create(
113
113
" content" : " Say this is a test" ,
114
114
}
115
115
],
116
- model = " gpt-3.5-turbo " ,
116
+ model = " gpt-4o " ,
117
117
stream = True ,
118
118
)
119
119
async for chat_completion in stream:
@@ -216,7 +216,7 @@ completion = client.chat.completions.create(
216
216
" content" : " Can you generate an example json object describing a fruit?" ,
217
217
}
218
218
],
219
- model = " gpt-3.5-turbo-1106 " ,
219
+ model = " gpt-4o " ,
220
220
response_format = {" type" : " json_object" },
221
221
)
222
222
```
@@ -256,7 +256,7 @@ client = OpenAI()
256
256
257
257
try :
258
258
client.fine_tuning.jobs.create(
259
- model = " gpt-3.5-turbo " ,
259
+ model = " gpt-4o " ,
260
260
training_file = " file-abc123" ,
261
261
)
262
262
except openai.APIConnectionError as e:
@@ -305,10 +305,10 @@ client.with_options(max_retries=5).chat.completions.create(
305
305
messages = [
306
306
{
307
307
" role" : " user" ,
308
- " content" : " How can I get the name of the current day in Node.js ?" ,
308
+ " content" : " How can I get the name of the current day in JavaScript ?" ,
309
309
}
310
310
],
311
- model = " gpt-3.5-turbo " ,
311
+ model = " gpt-4o " ,
312
312
)
313
313
```
314
314
@@ -339,7 +339,7 @@ client.with_options(timeout=5.0).chat.completions.create(
339
339
" content" : " How can I list all files in a directory using Python?" ,
340
340
}
341
341
],
342
- model = " gpt-3.5-turbo " ,
342
+ model = " gpt-4o " ,
343
343
)
344
344
```
345
345
@@ -384,7 +384,7 @@ response = client.chat.completions.with_raw_response.create(
384
384
" role" : " user" ,
385
385
" content" : " Say this is a test" ,
386
386
}],
387
- model = " gpt-3.5-turbo " ,
387
+ model = " gpt-4o " ,
388
388
)
389
389
print (response.headers.get(' X-My-Header' ))
390
390
@@ -417,7 +417,7 @@ with client.chat.completions.with_streaming_response.create(
417
417
" content" : " Say this is a test" ,
418
418
}
419
419
],
420
- model = " gpt-3.5-turbo " ,
420
+ model = " gpt-4o " ,
421
421
) as response:
422
422
print (response.headers.get(" X-My-Header" ))
423
423
0 commit comments