Skip to content

v1.12.0

Choose a tag to compare

@mpangrazzi mpangrazzi released this 24 Feb 14:28
94c2bda

✨ New Features

Chainlit Chat UI Integration

Hayhooks can now serve a built-in Chainlit-powered chat interface for your deployed pipelines - no frontend code required. Enable it with a single flag and get a fully-featured chat UI out of the box.

Key features:

  • Streaming chat - Real-time token streaming via SSE
  • Automatic model discovery - Pipelines are listed from /v1/models; auto-selects if only one is deployed
  • Custom React elements - Pipelines can emit rich UI widgets (cards, charts, etc.) rendered from .jsx files
  • Tool call visualization - Tool arguments and results are displayed in formatted steps
  • Status updates & notifications - Progress indicators and toast-style messages during pipeline execution
  • Fully configurable - Custom Chainlit app, mount path, request timeout, and more
# Start Hayhooks with the Chainlit UI enabled
hayhooks run --with-chainlit

# Or via environment variable
HAYHOOKS_CHAINLIT_ENABLED=true hayhooks run

Pipelines can emit rich events (status, tool results, custom elements) through callbacks:

from hayhooks.chainlit_events import create_custom_element_event

class PipelineWrapper(BasePipelineWrapper):
    def on_tool_call_end(self, tool_name, arguments, result, error):
        return [
            create_custom_element_event(
                name="WeatherCard",
                props={"location": "Rome", "temperature": 22}
            )
        ]

See the Chainlit Integration docs and the Weather Agent example for full details.

OpenAI Chat Completion Compatibility Layer Update

Hayhooks OpenAI compatibility layer for the Chat Completion API is now powered by fastapi-openai-compat.

📚 Documentation

  • Added comprehensive Chainlit Integration documentation with architecture diagrams and configuration reference
  • Updated README with Chainlit integration notes
  • Fixed some broken documentation links

--

What's Changed

Full Changelog: v1.11.0...v1.12.0

Contributors