Module: OllamaChat::History

Included in:
Chat
Defined in:
lib/ollama_chat/history.rb

Overview

A module that provides history management functionality for OllamaChat sessions.

The History module encapsulates methods for initializing, saving, and clearing command-line history within the OllamaChat application. It handles persistence of user input history to a file and ensures that chat sessions can maintain state across invocations by loading previous command histories.

Examples:

Initializing chat history

chat.init_chat_history

Saving chat history

chat.save_history

Clearing chat history

chat.clear_history