Autosaving Conversations in Pinocchio

Configure automatic saving of conversation histories

Sections

Terminology & Glossary
📖 Documentation
Navigation
58 sectionsv0.1
📄 Autosaving Conversations in Pinocchio — glaze help autosave
autosave

Autosaving Conversations in Pinocchio

Configure automatic saving of conversation histories

Topicconfigurationpersistencehistorypinocchioautosave

Pinocchio can automatically save your conversation histories to persistent storage. This allows you to review past conversations and maintain a record of your interactions.

Configuration

Command Line

Set autosave options using the --autosave flag with key-value pairs:

pinocchio --autosave enabled:yes,path:/custom/path,template:{{.Time.Format "150405"}}-{{.ConversationID}}.json

Available options:

  • enabled: "yes" or "no" (default: "no")
  • path: Directory path string for save location (default: ~/.pinocchio/history)
  • template: Custom template pattern for filename (default: {{.Year}}/{{.Month}}/{{.Day}}/{{.Time.Format "150405"}}-{{.ConversationID}}.json)

Configuration File

Add to ~/.pinocchio/config.yaml:

autosave:
  enabled: yes
  path: /custom/path/to/history  # optional
  template: custom-template      # optional

Path Templates

The save path supports Go template syntax with these variables:

  • {{.Year}}: Year (YYYY)
  • {{.Month}}: Month (MM)
  • {{.Day}}: Day (DD)
  • {{.Time}}: Conversation start time
  • {{.ConversationID}}: Unique conversation identifier

Default Behavior

When enabled without a custom path:

  • Creates ~/.pinocchio/history directory
  • Organizes files by date: YYYY/MM/DD
  • Names files with timestamp and conversation ID
  • Saves as JSON format

File Structure

Each save file contains:

  • Complete conversation history
  • Message timestamps
  • Conversation tree structure
  • Unique conversation identifier

This allows for future browsing, searching, and analysis of conversation histories.