Skip to main content

A fast and easy tool for asking questions via command line

Project description

FastAsk

FastAsk is a Python package that allows you to ask questions and get brief answers quickly. It uses OpenAI's GPT-4 model or a local model to generate responses. You can use it as a command-line utility.

Installation

FastAsk can be installed using pip:

pip install fastask

Usage

FastAsk can be used directly from the command line:

>>> ask "list items in dir by date"
* `ls -lt`: This command lists all items in the current directory sorted by modification time, newest first.  
* `ls -ltr`: This command lists all items in the current directory sorted by modification time, oldest first.

More examples:

>>> ask "find ip address"
* `curl ifconfig.me`: This command fetches your public IP address.
* `ip addr show`: This command shows your local IP address.
>>> ask "convert video to audio using ffmpeg"
* `ffmpeg -i input.mp4 -vn -ab 320k -ar 44100 -y output.mp3`: This command converts a video file (input.mp4) to an audio file (output.mp3) using ffmpeg.

Configuration

FastAsk can be configured to use either OpenAI's GPT-4 model or a local model. The configuration is stored in a config.ini file.

To configure FastAsk, run the command with the --reset flag:

>>> ask --reset

You will be prompted to choose between using your own OpenAI API key or a local model with Ollama. If you choose to use your own OpenAI API key, you will be asked to enter it.

Local Model

If you choose to use a local model with Ollama, FastAsk will download and set up the local model. This may take a few minutes. If Ollama is not installed, you will be given instructions on how to install it.

OpenAI Model

If you choose to use your own OpenAI API key, you will need to enter it when prompted. The API key is stored in the config.ini file and is used to authenticate with the OpenAI API.

Contributing

Contributions are welcome! Please submit a pull request or create an issue to discuss any changes you would like to make.

License

FastAsk is licensed under the MIT License. See the LICENSE file for more details.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

fastask-0.2.8.tar.gz (6.1 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

fastask-0.2.8-py3-none-any.whl (7.2 kB view details)

Uploaded Python 3

File details

Details for the file fastask-0.2.8.tar.gz.

File metadata

  • Download URL: fastask-0.2.8.tar.gz
  • Upload date:
  • Size: 6.1 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.11.6

File hashes

Hashes for fastask-0.2.8.tar.gz
Algorithm Hash digest
SHA256 63a9e963bcd8583641cb60095bbc9c79e9db36fa5eeb970e5967592c47900811
MD5 1887af37a132c93ab4ab763a145d73d5
BLAKE2b-256 ca7893c488a4fb2441961b73456d753e270ae70b0cdec51610606fddf1be8ddc

See more details on using hashes here.

File details

Details for the file fastask-0.2.8-py3-none-any.whl.

File metadata

  • Download URL: fastask-0.2.8-py3-none-any.whl
  • Upload date:
  • Size: 7.2 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.11.6

File hashes

Hashes for fastask-0.2.8-py3-none-any.whl
Algorithm Hash digest
SHA256 5a459eb123a9c079f4117e1c74a05443af14ba4cf720e09f05f40d9130b1f97a
MD5 8d8c85c974dba8de2b52bb072aa8cee4
BLAKE2b-256 efd1d910e8a8b91d433d9c6d105beb7be1c9723cfa54f30b8c1b6741102b5b8b

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page