Skip to content

Commit ebdb4f7

Browse files
stainless-app[bot]stainless-bot
authored andcommitted
docs: improve jsr documentation (#1197)
1 parent 6961c37 commit ebdb4f7

File tree

1 file changed

+10
-5
lines changed

1 file changed

+10
-5
lines changed

README.md

Lines changed: 10 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -14,16 +14,21 @@ To learn how to use the OpenAI API, check out our [API Reference](https://platfo
1414
npm install openai
1515
```
1616

17-
You can also import from jsr:
17+
### Installation from JSR
1818

19-
<!-- x-release-please-start-version -->
19+
```sh
20+
deno add jsr:@openai/openai
21+
npx jsr add @openai/openai
22+
```
23+
24+
These commands will make the module importable from the `@openai/openai` scope:
25+
26+
You can also [import directly from JSR](https://jsr.io/docs/using-packages#importing-with-jsr-specifiers) without an install step if you're using the Deno JavaScript runtime:
2027

2128
```ts
2229
import OpenAI from 'jsr:@openai/openai';
2330
```
2431

25-
<!-- x-release-please-end -->
26-
2732
## Usage
2833

2934
The full API of this library can be found in [api.md file](api.md) along with many [code examples](https://github.com/openai/openai-node/tree/master/examples). The code below shows how to get started using the chat completions API.
@@ -622,7 +627,7 @@ TypeScript >= 4.5 is supported.
622627
The following runtimes are supported:
623628

624629
- Node.js 18 LTS or later ([non-EOL](https://endoflife.date/nodejs)) versions.
625-
- Deno v1.28.0 or higher, using `import OpenAI from "npm:openai"`.
630+
- Deno v1.28.0 or higher.
626631
- Bun 1.0 or later.
627632
- Cloudflare Workers.
628633
- Vercel Edge Runtime.

0 commit comments

Comments
 (0)