openai.apiKey

An API key (StoredKey or string) or a function returning the API key for OpenAI.

Defaults to StoredKey("OpenAI") unless baseURL is set to a different value.

It is strongly recommended to use StoredKey for passing and storing secret keys. For example, you can create a key “AnotherOpenAIKey” and set the apiKey parameter to StoredKey("AnotherOpenAIKey").

Syntax

apiKey