Wolfram Language Paclet Repository

Community-contributed installable additions to the Wolfram Language

Primary Navigation

    • Cloud & Deployment
    • Core Language & Structure
    • Data Manipulation & Analysis
    • Engineering Data & Computation
    • External Interfaces & Connections
    • Financial Data & Computation
    • Geographic Data & Computation
    • Geometry
    • Graphs & Networks
    • Higher Mathematical Computation
    • Images
    • Knowledge Representation & Natural Language
    • Machine Learning
    • Notebook Documents & Presentation
    • Scientific and Medical Data & Computation
    • Social, Cultural & Linguistic Data
    • Strings & Text
    • Symbolic & Numeric Computation
    • System Operation & Setup
    • Time-Related Computation
    • User Interface Construction
    • Visualization & Graphics
    • Random Paclet
    • Alphabetical List
  • Using Paclets
    • Get Started
    • Download Definition Notebook
  • Learn More about Wolfram Language

OpenAILink

Guides

  • OpenAILink

Tech Notes

  • Configuring OpenAI Credentials

Symbols

  • OpenAICompletion
  • OpenAICreateImage
  • OpenAIEmbedding
  • $OpenAIKey
  • OpenAIModels
  • $OpenAIKey
  • $OpenAIUser
Configuring OpenAI Credentials
OpenAILink functions call the OpenAI API. As such, they need access to an OpenAI API key from the user's account. These can be generated from the account page on the OpenAI website, or from https://beta.openai.com/account/api-keys when logged in.
By default, OpenAILink first checks whether the "OPENAI_API_KEY"
SystemCredential
for a key. If it is not set, it checks for the "OPENAI_API_KEY" environment variable. If Wolfram Language was not launched from a command line, it may not have access to many environment variables set in ~/.bash_profile, etc.
Evaluate
$OpenAIKey
to check if the API key is set:
In[1]:=
$OpenAIKey
Out[1]=
sk-m7......xG
If the API key is not set, it can be set for the current session:
$OpenAIKey
="<YOUR API KEY>";
Alternatively, it can be set persistently for future sessions:
SystemCredential["OPENAI_API_KEY"]="<YOUR API KEY>";
​
​
""

Powered by the Wolfram Cloud More about Wolfram Technology

© 2022 Wolfram Research, Inc. All rights reserved. Terms of Use Privacy Contact Us