appendix A Accessing OpenAI large language models

 

Although several commercial large language model (LLM) services are available, this book recommends using OpenAI services directly or through Azure OpenAI Studio. To access either service, you must create an account and register a payment method not covered in this appendix. The GPT-4 family of LLMs is considered best in class and better suited for agent development. Using open source and alternative services is always an option but generally only advisable after you’ve worked with GPT-4 for some time.

A.1 Accessing OpenAI accounts and keys

The following general steps can help you quickly set up using OpenAI LLMs for agent development. Though using OpenAI and other commercial LLMs comes at a price, you can expect to pay less than US$100 to complete all the exercises in this book:

  1. Go to https://openai.com and log in, or register for an account and log in. If this is your first time creating an account, you’ll likely be given free credit in some amount. If you already have an account, you must register a payment method and type. It’s generally better to purchase a number of credits at a time. This will allow you to manage the costs better and avoid overruns.
  2. After logging in to the platform, select ChatGPT or the API, as shown in figure A.1. Choose the API.
Figure A.1 Selecting the API section of the OpenAI platform
figure
  1. Open the left menu, and select the API Keys option, as shown in figure A.2.
Figure A.2 Selecting the API Keys option
figure

A.2 Azure OpenAI Studio, keys, and deployments