v1.12.0
✨ 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
.jsxfiles - 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 runPipelines 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
- Integration of
fastapi-openai-compatfor OpenAI Chat Completion compat layer by @mpangrazzi in #218 - Chainlit integration by @mpangrazzi in #212
- Update README and docs with a note about chainlit integration by @mpangrazzi in #220
- docs: fix docs link by @anakin87 in #221
- Refactoring
ui->chainlitby @mpangrazzi in #222
Full Changelog: v1.11.0...v1.12.0