This project is the .NET version of ai-cli project.
Install .NET 7 or newer and run this command:
$ dotnet tool install --global dotnet-ai-core
Usage
$ dotnet-ai-core ask "Check process running on port"
You'd need to enter your own OpenAI API key Here's how you can get one
- Go to https://openai.com/api/login
- Create an account or log into your existing account
- Go to https://beta.openai.com/account/api-keys or
- Run
ai auth
, enter your API KEY and you're good to go!
Pricing
The current prompt length is ~840
tokens and the pricing for text-davinci-002
is $0.02
for 1K
tokens which is ~$0.017/command
. We'll see if we can improve the response as well as reduce the per-command-cost with fine-tuning.
$ dotnet tool install --global dotnet-ai-core
$ dotnet-ai-core
...
Ask question to GPT3 from your terminal
USAGE
$ dotnet-ai-core ask [question]
ARGUMENTS
QUESTION Your question
DESCRIPTION
Ask question to GPT3 from your terminal
EXAMPLES
$ dotnet-ai-core ask "Check running process on port 3000"
Update existing or add new OpenAI API Key
USAGE
$ dotnet-ai-core auth
DESCRIPTION
Update existing or add new OpenAI API Key
EXAMPLES
$ dotnet-ai-core auth (Follow the prompt)
Change model preference (default: text-davinci-003)
USAGE
$ dotnet-ai-core model
DESCRIPTION
Change model preference (default: text-davinci-003)
EXAMPLES
$ dotnet-ai-core model (Follow the prompt)