Skip to content

Commit

Permalink
docs: update deno link in more places (#431)
Browse files Browse the repository at this point in the history
  • Loading branch information
stainless-bot authored Nov 6, 2023
1 parent 871ceac commit 5da63d4
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 5 deletions.
6 changes: 5 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,10 +18,14 @@ yarn add openai

You can import in Deno via:

<!-- x-release-please-start-version -->

```ts
import OpenAI from 'https://deno.land/x/openai';
import OpenAI from 'https://deno.land/x/openai@4.15.4/mod.ts';
```

<!-- x-release-please-end -->

## Usage

The full API of this library can be found in [api.md file](https://github.com/openai/openai-node/blob/master/api.md). The code below shows how to get started using the chat completions API.
Expand Down
8 changes: 4 additions & 4 deletions build-deno
Original file line number Diff line number Diff line change
Expand Up @@ -5,17 +5,16 @@ set -exuo pipefail
rm -rf deno; mkdir deno
cp -rp src/* deno

PACKAGE_VERSION=$(node -p 'require("./package.json").version')

# x-release-please-start-version
cat << EOF > deno/README.md
# OpenAI Node API Library - Deno build
This is a build produced from https://github.com/openai/openai-node - please go there to read the source and docs, file issues, etc.
This is a build produced from https://github.com/openai/openai-node please go there to read the source and docs, file issues, etc.
Usage:
\`\`\`ts
import OpenAI from "https://deno.land/x/openai@$PACKAGE_VERSION/mod.ts";
import OpenAI from "https://deno.land/x/openai@4.15.4/mod.ts";
const client = new OpenAI();
\`\`\`
Expand All @@ -26,6 +25,7 @@ Note that in many Deno environments, you can also do this:
import OpenAI from "npm:openai";
\`\`\`
EOF
# x-release-please-end

rm deno/_shims/auto/*-node.ts
for dir in deno/_shims deno/_shims/auto; do
Expand Down

0 comments on commit 5da63d4

Please sign in to comment.