Skip to content

Commit

Permalink
feat: bump model in all example snippets to gpt-4o
Browse files Browse the repository at this point in the history
  • Loading branch information
yjp20 committed Nov 18, 2024
1 parent 12f9334 commit 6961c37
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -173,7 +173,7 @@ const openai = new OpenAI();

async function main() {
const stream = await openai.beta.chat.completions.stream({
model: 'gpt-4',
model: 'gpt-4o',
messages: [{ role: 'user', content: 'Say this is a test' }],
stream: true,
});
Expand Down Expand Up @@ -226,7 +226,7 @@ const client = new OpenAI();
async function main() {
const runner = client.beta.chat.completions
.runTools({
model: 'gpt-3.5-turbo',
model: 'gpt-4o',
messages: [{ role: 'user', content: 'How is the weather this week?' }],
tools: [
{
Expand Down Expand Up @@ -368,7 +368,7 @@ Error codes are as followed:
All object responses in the SDK provide a `_request_id` property which is added from the `x-request-id` response header so that you can quickly log failing requests and report them back to OpenAI.

```ts
const completion = await client.chat.completions.create({ messages: [{ role: 'user', content: 'Say this is a test' }], model: 'gpt-4' });
const completion = await client.chat.completions.create({ messages: [{ role: 'user', content: 'Say this is a test' }], model: 'gpt-4o' });
console.log(completion._request_id) // req_123
```

Expand All @@ -392,7 +392,7 @@ const azureADTokenProvider = getBearerTokenProvider(credential, scope);
const openai = new AzureOpenAI({ azureADTokenProvider });

const result = await openai.chat.completions.create({
model: 'gpt-4-1106-preview',
model: 'gpt-4o',
messages: [{ role: 'user', content: 'Say hello!' }],
});

Expand Down

0 comments on commit 6961c37

Please sign in to comment.