@@ -41,7 +41,7 @@ chat_completion = client.chat.completions.create(
4141 " content" : " Say this is a test" ,
4242 }
4343 ],
44- model = " gpt-3.5-turbo " ,
44+ model = " gpt-4o " ,
4545)
4646```
4747
@@ -164,7 +164,7 @@ async def main() -> None:
164164 " content" : " Say this is a test" ,
165165 }
166166 ],
167- model = " gpt-3.5-turbo " ,
167+ model = " gpt-4o " ,
168168 )
169169
170170
@@ -183,8 +183,13 @@ from openai import OpenAI
183183client = OpenAI()
184184
185185stream = client.chat.completions.create(
186- model = " gpt-4" ,
187- messages = [{" role" : " user" , " content" : " Say this is a test" }],
186+ messages = [
187+ {
188+ " role" : " user" ,
189+ " content" : " Say this is a test" ,
190+ }
191+ ],
192+ model = " gpt-4o" ,
188193 stream = True ,
189194)
190195for chunk in stream:
@@ -231,7 +236,7 @@ openai.base_url = "https://..."
231236openai.default_headers = {" x-foo" : " true" }
232237
233238completion = openai.chat.completions.create(
234- model = " gpt-4 " ,
239+ model = " gpt-4o " ,
235240 messages = [
236241 {
237242 " role" : " user" ,
@@ -349,7 +354,7 @@ completion = client.chat.completions.create(
349354 " content" : " Can you generate an example json object describing a fruit?" ,
350355 }
351356 ],
352- model = " gpt-3.5-turbo-1106 " ,
357+ model = " gpt-4o " ,
353358 response_format = {" type" : " json_object" },
354359)
355360```
@@ -389,7 +394,7 @@ client = OpenAI()
389394
390395try :
391396 client.fine_tuning.jobs.create(
392- model = " gpt-3.5-turbo " ,
397+ model = " gpt-4o " ,
393398 training_file = " file-abc123" ,
394399 )
395400except openai.APIConnectionError as e:
@@ -456,10 +461,10 @@ client.with_options(max_retries=5).chat.completions.create(
456461 messages = [
457462 {
458463 " role" : " user" ,
459- " content" : " How can I get the name of the current day in Node.js ?" ,
464+ " content" : " How can I get the name of the current day in JavaScript ?" ,
460465 }
461466 ],
462- model = " gpt-3.5-turbo " ,
467+ model = " gpt-4o " ,
463468)
464469```
465470
@@ -490,7 +495,7 @@ client.with_options(timeout=5.0).chat.completions.create(
490495 " content" : " How can I list all files in a directory using Python?" ,
491496 }
492497 ],
493- model = " gpt-3.5-turbo " ,
498+ model = " gpt-4o " ,
494499)
495500```
496501
@@ -535,7 +540,7 @@ response = client.chat.completions.with_raw_response.create(
535540 " role" : " user" ,
536541 " content" : " Say this is a test" ,
537542 }],
538- model = " gpt-3.5-turbo " ,
543+ model = " gpt-4o " ,
539544)
540545print (response.headers.get(' X-My-Header' ))
541546
@@ -568,7 +573,7 @@ with client.chat.completions.with_streaming_response.create(
568573 " content" : " Say this is a test" ,
569574 }
570575 ],
571- model = " gpt-3.5-turbo " ,
576+ model = " gpt-4o " ,
572577) as response:
573578 print (response.headers.get(" X-My-Header" ))
574579
0 commit comments