v1.8.0
✨ New Features
Support for relative imports in PipelineWrapper
Pipeline wrappers are now registered as Python packages, enabling you to use relative imports to better organize your code into multiple files within the same pipeline folder:
my_pipeline/
├── pipeline_wrapper.py # Main wrapper
├── utils.py # Helper functions
├── prompts.py # Prompt templates
└── config.py # Configuration
So in pipeline_wrapper.py you can do:
# pipeline_wrapper.py
from haystack import Pipeline
from hayhooks import BasePipelineWrapper
# Relative imports from sibling modules
from .utils import process_text, format_response
from .prompts import SYSTEM_PROMPT
from .config import DEFAULT_MODEL
class PipelineWrapper(BasePipelineWrapper):
def setup(self) -> None:
self.pipeline = Pipeline()
# ... setup using imported utilities
def run_api(self, query: str) -> str:
processed = process_text(query)
result = self.pipeline.run({"prompt": {"query": processed}})
return format_response(result)Python 3.13 and 3.14 support
Hayhooks now officially supports Python 3.13 and 3.14. The full supported range is Python 3.9 through 3.14.
Please note that while Hayhooks is compatible with those versions, some dependencies may not yet have pre-built wheels for them.
What's Changed
- Using ubuntu-slim on some workflows by @mpangrazzi in #197
- Add support for relative imports in pipeline wrappers by @mpangrazzi in #198
- Extend python support to versions 3.13 and 3.14 by @mpangrazzi in #200
Full Changelog: v1.7.0...v1.8.0