Module: OllamaChat::Conversation

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

Overview

A module that provides conversation persistence functionality for the OllamaChat::Chat class.

This module encapsulates the logic for saving and loading chat conversations to/from JSON files. It delegates the actual file operations to the ‘messages` object, which is expected to respond to `save_conversation` and `load_conversation` methods.

Examples:

Save a conversation

chat.save_conversation('my_chat.json')

Load a conversation

chat.load_conversation('my_chat.json')