🚀 Big News: Socket Acquires Coana to Bring Reachability Analysis to Every Appsec Team.Learn more

haiku-ollama

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

haiku-ollama

A command-line interface for interacting with Ollama AI models

0.1.0
Maintainers
1

Haiku

A clean, elegant command-line interface for chatting with local AI models via Ollama, featuring real-time Markdown rendering.

Features

  • 💬 Interactive chat interface with Ollama models
  • 📝 Real-time Markdown rendering (code blocks, tables, lists, etc.)
  • 🔄 Full conversation context preservation
  • 🎯 Customizable system prompts
  • 🌡️ Adjustable temperature settings
  • 💾 Conversation saving to files

Installation

pip install haiku-ollama 

Make sure you have Ollama installed and running before using Haiku.

Usage

Start a conversation with the default model (llama3.1:8b):

haiku 

Command Line Options

OptionDescription
--modelSpecify which Ollama model to use (default: llama3.1:8b)
--keep-context, -kMaintain full conversation history between prompts
--system, -sSet a custom system prompt to guide the model's behavior
--temperature, -tSet temperature (0.0-1.0) - lower values are more deterministic
--saveSave the conversation to a specified file

Examples

Using a specific model:

haiku --model mistral:7b 

Preserving conversation context:

haiku --keep-context 

Setting a system prompt:

haiku --system "You are an expert programmer who explains code concisely" 

Adjusting temperature:

haiku --temperature 0.2 

Saving your conversation:

haiku --save conversation.md 

Combining multiple options:

haiku --model codellama --keep-context --system "You write Python code" --temperature 0.3 --save coding_session.md 

Exiting

To exit the program, simply type exit or bye, or press Ctrl+C.

Requirements

  • Python 3.8+
  • Ollama installed and running
  • Python packages: ollama, rich

Contributing

Contributions are welcome! Feel free to submit issues or pull requests.

License

MIT License

FAQs

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts