Lead Image © lexandersikovl, 123RF.com
Microsoft AI Shell
Interactive
Contrary to what the name suggests, AI Shell is not designed as a standalone application. Instead, it connects PowerShell with a range of configurable assistance systems, such as Microsoft's Copilot or OpenAI's generative pretrained transformers (GPTs). AI Shell is developed by the PowerShell team and does not have its own intelligence. In any case, you need an access account for an artificial intelligence (AI) provider whose services you want to access with AI Shell integration.
Contact with OpenAI's REST API
To better understand the configuration options in AI Shell, you should take a look at direct, script-based access to OpenAI's API. The popular ChatGPT chatbot is symbolic of the innovative leaps in recent years, and thanks to collaborations, the technology has found its way into numerous offerings, such as Microsoft's Azure AI Services, which bundle a basket of technologies to create a joint offering.
For script-based access to OpenAI's services, you need an API key, which in turn means you need an account for the software manufacturer's platform [1]. Even a free account offers a range of different usage options. If you happen to run into a usage limit wall or some other restriction, it might be worth your while to deposit a small amount of credit. Just $5 will mean that you can experiment for quite a while.
Once you have generated an API key, you can contact the REST API directly from the command line – you don't need a program or a special extension beyond the standard tools to get started. The API keys in Listing 1 are examples that you will need to replace with your own keys.
Listing 1
Connecting to the OpenAI REST API
## A:
Buy this article as PDF
(incl. VAT)
Buy ADMIN Magazine
Subscribe to our ADMIN Newsletters
Subscribe to our Linux Newsletters
Find Linux and Open Source Jobs
Most Popular
Support Our Work
ADMIN content is made possible with support from readers like you. Please consider contributing when you've found an article to be beneficial.

