Skip to main content
Deno 2 is finally here 🎉️
Learn more
Module

x/openai/core.ts>readEnv

Deno build of the official Typescript library for the OpenAI API.
Extremely Popular
Latest
variable readEnv
import { readEnv } from "https://deno.land/x/openai@v4.69.0/core.ts";

Read an environment variable.

Trims beginning and trailing whitespace.

Will return undefined if the environment variable doesn't exist or cannot be accessed.

type

(env: string) => string | undefined