Skip to content

Releases: DougHaber/lair

v0.4.0 - PDF and text attachments, Reasoning models

27 Jan 15:49
Compare
Choose a tag to compare

New Features

Text Attachment & PDF Support

When using the chat interface and the util command, PDF and text files are now supported. The usage is exactly the same as for image files.

crocodile> Write a limerick about each of the provided short stories. It must be in proper limerick style and format. <<~/books/*.txt>>
Cool Air by H.P. Lovecraft: There once was a scientist so fine, Investigated strange colds in his time. He sought answers with care, In air that chilled with despair, And found horrors that blurred his mind.

The Eyes Have It by Philip K. Dick: In cities they hid their faces so bright, Yet their eyes betrayed their true sight. A subtle, sly guise, That pierced mortal eyes, Exposing souls in the dark of night.

Here is an example using a PDF:

crocodile> Using the provided 10-Q for Tesla, please write a summary in the form of a haiku. Respond with only a nicely formatted haiku following strict haiku rules and style. <<tsla-20240930-10-q.pdf>>
Electric dreams ahead
Production ramps, profits rise
Autonomous roads

The util sub-command also now supports attaching PDFs and text files for one off-processing:

$ lair -m llama3.2:3b-ctx0 util \
    -a ~/files/tos.pdf \
    -i 'List out anything worrisome or unusual from the provided terms of service'
* The inactivity disconnect policy after 15 minutes of inactivity.
* Automated processes are not allowed to maintain constant connections (section 3a).
* ISP has the right to audit connections to enforce terms (section 13b).

Styling for Reasoning Models

The thought tags in output from reasoning models can now be styled. Several new configuration options were added to control this behavior.

reasoning

Changelog

  • Add support for styling reasoning model thought tag output
  • Add support for PDF and text attachments to chat and util
  • Fix issue where history could be appended to, even on chat failures

v0.3.0 - New chat commands & quality of life improvements

17 Jan 15:49
Compare
Choose a tag to compare

New Features

New Chat Commands

/comfy - Call ComfyUI workflows

A new /comfy command in the chat interface makes it possible to call any of the ComfyUI workflows from within the chat interface. The arguments are exactly the same as the lair comfy sub-command. For example:

sdxl> /comfy image -p 'a duck in space' -o space-duck.jpg

space-duck

/extract - Retrieve sections of the last response

The /extract command provides a quick way to retrieve specific sections of a response. By default, sections are defined as content within markdown code blocks or between <answer></answer> tags. The definition of a section is configurable via the setting chat.embedded_syntax_regex.

For example, if an LLM responded with multiple code blocks, running /extract will retrieve the contents of the first one:

crocodile> /extract
package main

import "fmt"

func main() {
    fmt.Println("Hello, World!")
}

An index parameter could be provided to select which section to return. Indexes start at 0, and negative indexes are supported, such as -1 to refer to the last section.

crocodile> /extract 2
print("Hello, World!")

A second argument could provide a filename to save the contents into:

crocodile> /extract 0 ~/hello.go
Response saved  (76 bytes)

/list-models - Provide a list of available models

A /list-models command was added that retrieves a list of available models and their metadata. This release also adds auto-completion for the /model command to make selecting models faster.

1

Changelog

  • chat: Add /comfy command, allowing ComfyUI workflows to be called from the chat interface
  • chat: Add /extract command, allowing for extracting content from response sections (such as code blocks)
  • chat: Add /list-models command, providing a list of available models
  • chat: Add support for /last-prompt and /last-response to save to a file
  • chat: Add auto-complete to /models based on available models
  • chat: Support external command registration, allowing other modules to add commands to chat
  • config: Add _inherit property, allowing config sections to inherit from other sections
  • README.md: Many cleanups, fixes, and refactors

v0.2.0 - Support for Comfy Workflows

09 Jan 21:44
Compare
Choose a tag to compare

New Features

Comfy Workflow

A new sub-command allows for running ComfyUI workflows. For more details see the PR and documentation

Three workflows have been added:

  • image - Basic image generation with support for LoRAs. Based on the ComfyUI default workflow.
  • ltxv-i2v - LTX Video Image to Video. Based on the image to video workflow in the ComfyUI-LTXVideo repo.
  • ltxv-prompt - Returns automatic generated prompts for images from Florence2 which can then be edited locally and used with ltxv-i2v.

Changelog

  • New sub-command: comfy for running ComfyUI workflows
  • Add chat.attachments_enabled setting to allow for disabling attachments
  • Chat file attachment syntax now uses doubled angle brackets <<~/file.png>>
  • Add chat.attachments_syntax_regex to allow for customizing the syntax
  • Add comfy workflow image for basic image diffusion
  • Add comfy workflow ltxv-i2v for LTX Video image to video
  • Add comfy workflow ltxv-prompt for creating video prompts from Florence2
  • New function: lair.config.get(), to simplify retrieving settings without having to specify the active mode
  • Fix debug checks to be for all log levels inclusive of debug, instead of only debug
  • settings.yaml: Fixed issues with section ordering
  • config.yaml: Added sdxl and sdxl_lightning example configs (commented by default)
  • Config files now support an _inherit attribute which contains a list of other modes to inherit from (experimental)

v0.1.0 - Initial Release w/ Chat & Util Modules

01 Jan 15:22
Compare
Choose a tag to compare

This is the initial release of the open source version of Lair. Two modules are included: chat & util:

  • chat: Command line chat interface

    • Rich interface w/ auto-complete, commands, shortcuts, etc
    • File based session management
    • Support for image file attachments
    • Markdown rendering & syntax highlighting
  • util: Unix-style utility for scripting or one-off LLM usage

    • Simple I/O for sending content via file or pipes to LLMs
    • Support for image file attachments

See the README.md for installation notes and examples.