https://github.com/evmar/ai
simple command-line wrapper for various LLMs
https://github.com/evmar/ai
ai
Last synced: 5 months ago
JSON representation
simple command-line wrapper for various LLMs
- Host: GitHub
- URL: https://github.com/evmar/ai
- Owner: evmar
- Created: 2024-02-27T04:03:59.000Z (over 2 years ago)
- Default Branch: main
- Last Pushed: 2025-01-23T20:02:48.000Z (over 1 year ago)
- Last Synced: 2025-03-18T13:51:26.123Z (about 1 year ago)
- Topics: ai
- Language: Go
- Homepage:
- Size: 53.7 KB
- Stars: 1
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
A simple command-line wrapper for making LLM calls to OpenAI,
Ollama, and Google Gemini.
There are surely better options out there, but this one is mine!
(I think if you actually wanted to use someone's software to make LLM
calls, [llm](https://github.com/simonw/llm) is a good choice.)
## Setup
Requires a config file at `~/.config/ai.toml`.
Sample config file:
```
default_backend = "llama"
[backend.openai]
# requires $OPENAI_API_KEY in env
mode = "openai"
[backend.llama]
mode = "ollama"
model = "llama3.2:1b"
# if url unspecified, obeys $OLLAMA_HOST env, defaulting to localhost
url = "http://somehost:11434"
[backend.google]
# requires $GOOGLE_API_KEY in env
mode = "google"
model = "gemini-1.5-flash"
# model = "gemini-2.0-flash-exp"
```