Skip to content

Commit

Permalink
Updated readme
Browse files Browse the repository at this point in the history
  • Loading branch information
baalimago committed Nov 6, 2024
1 parent d180cd6 commit 821b491
Showing 1 changed file with 19 additions and 12 deletions.
31 changes: 19 additions & 12 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
# clai: command line artificial intelligence

[![Go Report Card](https://goreportcard.com/badge/github.com/baalimago/clai)](https://goreportcard.com/report/github.com/baalimago/clai)
![Wakatime](https://wakatime.com/badge/user/018cc8d2-3fd9-47ef-81dc-e4ad645d5f34/project/018e07e1-bd22-4077-a213-c16290d3db52.svg)

Expand All @@ -10,43 +11,49 @@ The multi-vendor aspect enables easy comparisons between different models, also
![clai_in_action_example](./img/example.gif "Example of clai in action")

## 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](./internal/tools/)
* LLM Profiles - Preconfigured prompts with specific tools
* Photo generation*
* Human readable / robot readable output
* 100% go standard library (except for /x/net)


- Prompting with input from:
- Piped data
- Globbed file input
- Args
- Conversations (with same input options as above)
- Tools calling [with easily forkable + extendable tools](./internal/tools/)
- LLM Profiles - Preconfigured prompts with specific 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

- **Go:** Install Go from [here](https://golang.org/doc/install).
- **OpenAI API Key:** Set the `OPENAI_API_KEY` env var to your [OpenAI API key](https://platform.openai.com/docs/quickstart/step-2-set-up-your-api-key). [Text models](https://platform.openai.com/docs/models/gpt-4-and-gpt-4-turbo), [photo models](https://platform.openai.com/docs/models/dall-e).
- **Anthropic API Key:** Set the `ANTHROPIC_API_KEY` env var to your [Anthropic API key](https://console.anthropic.com/login?returnTo=%2F). [Text models](https://docs.anthropic.com/claude/docs/models-overview#model-recommendations).
- **Mistral API Key:** Set the `MISTRAL_API_KEY` env var to your [Mistral API key](https://console.mistral.ai/). [Text models](https://docs.mistral.ai/getting-started/models/)
- **Novita AI:** Set the `NOVITA_API_KEY` env var to your [Novita API key](https://novita.ai/settings?utm_source=github_clai&utm_medium=github_readme&utm_campaign=link#key-management). Target the model using novita prefix, like this: `novita:<target>`, where `<target>` is one of the [text models](https://novita.ai/model-api/product/llm-api?utm_source=github_clai&utm_medium=github_readme&utm_campaign=link).
- **Ollama:** Start your ollama server (defaults to localhost:11434). Target using model format `ollama:<target>`, where `<target>` is optional (defaults to llama3). Reconfigure url with `clai s -> 1 -> <ollama-model-conf>`
- **Glow**(Optional): Install [Glow](https://github.com/charmbracelet/glow) for formatted markdown output when querying text responses.
- **Novita AI:**(Optional) Set the `NOVITA_API_KEY` env var to your [Novita API key](https://novita.ai/settings?utm_source=github_clai&utm_medium=github_readme&utm_campaign=link#key-management). [Text models](https://novita.ai/model-api/product/llm-api?utm_source=github_clai&utm_medium=github_readme&utm_campaign=link).

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](./EXAMPLES.md#Models) for how to swap.

## Get started

```bash
go install github.com/baalimago/clai@latest
```

You may also use the setup script:

```bash
curl -fsSL https://raw.githubusercontent.com/baalimago/clai/main/setup.sh | sh
```

Either look at `clai help` or the [examples](./EXAMPLES.md) for how to use `clai`.

## Honorable mentions

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

0 comments on commit 821b491

Please sign in to comment.