Skip to content

Commit

Permalink
chore (docs): improve strict compatibility docs in openai provider
Browse files Browse the repository at this point in the history
  • Loading branch information
lgrammel committed Jun 7, 2024
1 parent e84cc3a commit c55a46f
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions content/providers/01-ai-sdk-providers/01-openai.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,8 @@ If you need a customized setup, you can import `createOpenAI` from `@ai-sdk/open
import { createOpenAI } from '@ai-sdk/openai';

const openai = createOpenAI({
// custom settings
// custom settings, e.g.
compatibility: 'strict', // strict mode, enable when using the OpenAI API
});
```

Expand Down Expand Up @@ -70,7 +71,8 @@ You can use the following optional settings to customize the OpenAI provider ins

OpenAI compatibility mode. Should be set to `strict` when using the OpenAI API,
and `compatible` when using 3rd party providers. In `compatible` mode, newer
information such as streamOptions are not being sent. Defaults to 'compatible'.
information such as `streamOptions` are not being sent, resulting in `NaN`
token usage. Defaults to 'compatible'.

## Language Models

Expand Down

0 comments on commit c55a46f

Please sign in to comment.