clai

command module
v1.3.4 Latest Latest
Warning

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

Go to latest
Published: May 3, 2024 License: MIT Imports: 9 Imported by: 0

README

clai: command line artificial intelligence

Go Report Card

clai integrates AI models of multiple vendors via with the terminal. You can generate images, text, summarize content and chat while using native terminal functionality, such as pipes and termination signals.

The multi-vendor aspect enables easy comparisons between different models, also removes the need for multiple subscriptions: most APIs are usage-based (some with expiration time).

clai_in_action_example

Features

  • Prompting with input from:
    • Piped data
    • Globbed file input
    • Args
  • Conversations (with same input options as above)
  • Tools calling with easily forkable + extendable tools
  • Photo generation*
  • Human readable / robot readable output
  • 100% go standard library (except for /x/net)

* Only with dall-e for the moment. Nag on me to implement modellabs and I'll do it.

Prerequisites

Note that you can only use the models that you have bought an API key for.

Most text and photo based models within the respective vendors are supported, see model configurations for how to swap.

Get started

go install github.com/baalimago/clai@latest

Either look at clai help or the examples for how to use clai.

Honorable mentions

This project was originally inspired by: https://github.com/Licheam/zsh-ask, many thanks to Licheam for the inspiration.

Documentation

The Go Gopher

There is no documentation for this package.

Directories

Path Synopsis
models
This package contains test intended to be used by the implementations of the Querier, ChatQuerier and StreamCompleter interfaces
This package contains test intended to be used by the implementations of the Querier, ChatQuerier and StreamCompleter interfaces

Jump to

Keyboard shortcuts

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