How to run AI Prompt from the command line

This page provides information on how to run AI prompts from the command line using aiprompt.exe. You can download the aiprompt.exe from this page, and you can see how it can be used from cmd.exe or powershell.

What is AI Prompt

The AI Prompt is a command line tool which makes it possible to run AI prompts on the command line, that are evaluated by HTTP AI APIs, such as Ozeki AI Server or Chat GPT

How to use AI Prompt

Download

How to create an HTTP API user in Ozeki AI Server (Video tutorial)

This video demonstrates how to create an HTTP AI user in Ozeki AI Server It also shows how to enable communacation event logs, which will be useful to confirm your HTTP AI user works properly later on.

Video 1 - Create an HTTP API user in Ozeki AI Server

How to create an HTTP API user in Ozeki AI Server

Figure 1 - Open AI Studio

Figure 2 - Select "AI Gateway" Tab

Figure 3 - Select "Add new AI chat bot" link

Figure 4 -

Figure 5 -

Figure 6 -

How to run a prompt using the HTTP API user

[Video] [Screenshots]

Command line parameters

The table contains the paramaters that can be passed to configure the application.

Argument Description Default Value
<prompt> The prompt to be sent to the HTTP AI API. -
-h <url> Specifies the URL of the server. http://localhost:9511/api?command=chatgpt
-u <username> Specifies the username. (none)
-p <password> Specifies the password. (none)
-a <apikey> Specifies the API key. -
-j Specifies if the prompt is in JSON format False
-m <model> Specifies the model name. AI
-l Enables verbose mode. False
-v Displays version information. -
-? Displays help and usage information. -

To run the tool, the prompt and some credentials must be specified. The prompt can be set using the Standard Input or the prompt argument. For the credentials you either have to set the username and password of the HTTP user or your API key

Examples [copy-paste ready instructions] [Screenshots]

Using environment variables

How to setup environment variables on the command line

How to list environment variables on the command line

How to run aiprompt.exe with environment variables

Finding errors

How to turn on verbouse logging in aiprompt.exe

More information