FixTypo

command module
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Nov 7, 2024 License: MIT Imports: 9 Imported by: 0

README

FixTypo CLI

A simple command-line chat application powered by Google's Gemini AI model (Gemini 1.5 Flash 8B) to help improve text by focusing on grammar and clarity directly through your terminal.

Prerequisites

  • Go 1.21 or higher
  • A Google AI Studio API key (Gemini)

Installation

You can install the application directly using Go:

go install github.com/Blindpete/FixTypo@latest

Or clone and build manually:

git clone https://github.com/Blindpete/FixTypo.git
cd FixTypo
go build

Configuration

Before running the application, you need to set up your Gemini API key as an environment variable:

On Linux / macOS
# Get the API key from https://aistudio.google.com/apikey
export GEMINI_API_KEY='your-api-key-here'
On Windows (PowerShell)
# Get the API key from https://aistudio.google.com/apikey
$env:GEMINI_API_KEY = "your-api-key-here"

Usage

After installation, simply run:

fixtypo

Or if built manually:

./fixtypo
Commands
  • Type your message and press Enter to send it to the Gemini AI for text improvement.
  • Type exit to end the conversation.

Model Configuration

The application uses the following default settings for the Gemini model:

  • Model: gemini-1.5-flash-8b
  • Temperature: 1.0
  • Top-K: 40
  • Top-P: 0.95
  • Max Output Tokens: 8192
  • Response Format: Plain text
  • System Instruction: Focus on grammar, punctuation, and clarity improvements

Example Interaction

Welcome to the FixTypo! Type 'exit' to end.
--- Thursday, November 7, 2024 at 22:08
🤠: lte's go
✨: Let's go!

Dependencies

Error Handling

The application includes error handling for:

  • Missing API key
  • Client initialization failures
  • Message sending errors
  • Input scanning errors

Documentation

The Go Gopher

There is no documentation for this package.

Jump to

Keyboard shortcuts

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