mirror of
https://github.com/deepset-ai/haystack.git
synced 2025-07-26 02:10:41 +00:00

* fix validation for dynamic outgoing edges * Update Documentation & Code Style * use class outgoing_edges as fallback if no instance is provided * implement classmethod approach * readd comment * fix mypy * fix tests * set outgoing_edges for all components * set outgoing_edges for mocks too * set document store outgoing_edges to 1 * set last missing outgoing_edges * enforce BaseComponent subclasses to define outgoing_edges * override _calculate_outgoing_edges for FileTypeClassifier * remove superfluous test * set rest_api's custom component's outgoing_edges * Update docstring Co-authored-by: Sara Zan <sara.zanzottera@deepset.ai> * remove unnecessary else Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com> Co-authored-by: Sara Zan <sara.zanzottera@deepset.ai>
19 lines
446 B
Python
19 lines
446 B
Python
"""
|
|
Pipelines allow putting together Components to build a graph.
|
|
|
|
In addition to the standard Haystack Components, custom user-defined Components
|
|
can be used in a Pipeline YAML configuration.
|
|
|
|
The classes for the Custom Components must be defined in this file.
|
|
"""
|
|
|
|
|
|
from haystack.nodes.base import BaseComponent
|
|
|
|
|
|
class SampleComponent(BaseComponent):
|
|
outgoing_edges: int = 1
|
|
|
|
def run(self, **kwargs):
|
|
raise NotImplementedError
|