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
awaitclient.chat.completions.create({ messages: [{ role:'user', content:'How can I get the name of the current day in Node.js?' }], model:'gpt-3.5-turbo' }, {
418
+
awaitclient.chat.completions.create({ messages: [{ role:'user', content:'How can I get the name of the current day in JavaScript?' }], model:'gpt-4o' }, {
419
419
maxRetries:5,
420
420
});
421
421
```
@@ -432,7 +432,7 @@ const client = new OpenAI({
432
432
});
433
433
434
434
// Override per-request:
435
-
awaitclient.chat.completions.create({ messages: [{ role: 'user', content: 'How can I list all files in a directory using Python?' }], model: 'gpt-3.5-turbo' }, {
435
+
awaitclient.chat.completions.create({ messages: [{ role: 'user', content: 'How can I list all files in a directory using Python?' }], model: 'gpt-4o' }, {
436
436
timeout: 5*1000,
437
437
});
438
438
```
@@ -485,13 +485,13 @@ You can also use the `.withResponse()` method to get the raw `Response` along wi
485
485
const client =newOpenAI();
486
486
487
487
const response =awaitclient.chat.completions
488
-
.create({ messages: [{ role: 'user', content: 'Say this is a test' }], model: 'gpt-3.5-turbo' })
488
+
.create({ messages: [{ role: 'user', content: 'Say this is a test' }], model: 'gpt-4o' })
489
489
.asResponse();
490
490
console.log(response.headers.get('X-My-Header'));
491
491
console.log(response.statusText); // access the underlying Response object
492
492
493
493
const { data: chatCompletion, response: raw } =awaitclient.chat.completions
494
-
.create({ messages: [{ role: 'user', content: 'Say this is a test' }], model: 'gpt-3.5-turbo' })
494
+
.create({ messages: [{ role: 'user', content: 'Say this is a test' }], model: 'gpt-4o' })
0 commit comments