go-ai-cli

command module
v0.0.0-...-d48bf00 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Mar 18, 2024 License: MIT Imports: 8 Imported by: 0

README

go-ai-cli

go-ai-cli is a versatile command-line interface that enables users to interact with various AI models for text generation, speech-to-text conversion, image generation, and web scraping. It is designed to be extensible with any AI service. This tool is ideal for developers, content creators, and anyone interested in leveraging AI capabilities directly from their terminal. This tool works well with Ollama.

Features

  • Text Generation: Utilize OpenAI's GPT-3 for generating text based on prompts.
  • Speech to Text: Convert spoken language into text.
  • Image Generation: Create images from textual descriptions.
  • Modular Design: Easily extendable to incorporate additional AI models and services.

Installation

Using Go
go install github.com/MohammadBnei/go-ai-cli@latest

with portaudio (recommended) :

go install -tags portaudio github.com/MohammadBnei/go-ai-cli@latest
Pre-compiled Binaries

Download the appropriate binary for your operating system from the releases page.

Configuration

Before using go-ai-cli, configure it with your OpenAI API key:

go-ai-cli config --OPENAI_KEY=<YOUR_API_KEY>

You can also specify the AI model to use:

go-ai-cli config --model=<MODEL_NAME>

To list available models:

go-ai-cli config -l

Usage

To start the interactive prompt:

go-ai-cli prompt

Within the prompt, you have several commands at your disposal:

  • ctrl+d: Quit the application.
  • ctrl+h: Display help information.
  • ctrl+g: Open options page.
  • ctrl+f: Add a file to the messages. The file content won't be sent to the model until you submit a prompt.

Advanced Configuration

The configuration file is located at $HOME/.go-ai-cli.yaml. You can customize various settings, including the default AI model and API keys for different services.

Contributing

Contributions are welcome! Please fork the repository, make your changes, and submit a pull request. Ensure your code follows the Go style guide.

License

go-ai-cli is open-source software licensed under the MIT License.

Documentation

Overview

Copyright © 2023 Mohammad-Amine BANAEI mohammadamine.banaei@pm.me

Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL