From 18b04e8bf872ea15cbbcd92a12282cbba873c677 Mon Sep 17 00:00:00 2001 From: Stainless Bot <107565488+stainless-bot@users.noreply.github.com> Date: Mon, 6 Nov 2023 02:54:32 +0000 Subject: [PATCH] fix: improve deno readme (#429) --- build-deno | 14 +++++++++----- 1 file changed, 9 insertions(+), 5 deletions(-) diff --git a/build-deno b/build-deno index 77c5d20e7..444794e89 100755 --- a/build-deno +++ b/build-deno @@ -5,20 +5,24 @@ set -exuo pipefail rm -rf deno; mkdir deno cp -rp src/* deno +PACKAGE_VERSION=$(node -p 'require("./package.json").version') + cat << EOF > deno/README.md # OpenAI Node API Library - Deno build -This is a build produced from openai/openai-node - please go there to read the source, 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. -Installation: +Usage: -\`\`\` -import OpenAI from "https://deno.land/x/openai"; +\`\`\`ts +import OpenAI from "https://deno.land/x/openai@$PACKAGE_VERSION/mod.ts"; + +const client = new OpenAI(); \`\`\` Note that in many Deno environments, you can also do this: -\`\`\` +\`\`\`ts import OpenAI from "npm:openai"; \`\`\` EOF