Categorygithub.com/duluk/ask-ai
repository
0.3.0
Repository: https://github.com/duluk/ask-ai.git
Documentation: pkg.go.dev

# Packages

No description provided by the author
No description provided by the author

# README

ask-ai

Description

The utility everyone has written for themselves, a basic CLI tool for asking LLMs questions without bothering with a mouse.

Full disclosure: this is my first Go project. I mainly write in Ruby, C and Python.

Installation

Just build the program and run it:

$ go mod tidy
$ go build ask-ai.go

Or, as I'm doing now (bc I'm old):

$ make build

Usage

Set the API Key

  1. Set {OPENAI,ANTHROPIC}_API_KEY in your environment; or
  2. Put the key in a file located at $HOME/.config/ask-ai/{openai,anthropic,google}-api-key

Ask a model a question

$ bin/ask-ai "What is the best chess opening for a beginner?"
  • If no query is provided, ask-ai will prompt for one:
$ bin/ask-ai
> What is the best chess opening for a checkers player?
  • You can provide a model with --model <model>:
$ bin/ask-ai --model gemini "Why do you pull in so many modules for th Go API?"

[NOTE]

This is a work in progress and not all functionality has been added.

I also plan to provide a flag for context - that is, use the last n queries to send to the LLM for context.