mirror of
https://github.com/deepset-ai/haystack.git
synced 2025-12-31 17:17:31 +00:00
* rearrange code * fix tests * relnote * merge test modules * remove extra * rearrange draw tests * forgot * remove unused import
19 lines
392 B
Python
19 lines
392 B
Python
# SPDX-FileCopyrightText: 2022-present deepset GmbH <info@deepset.ai>
|
|
#
|
|
# SPDX-License-Identifier: Apache-2.0
|
|
from haystack.core.component import component
|
|
|
|
|
|
@component
|
|
class Double:
|
|
"""
|
|
Doubles the input value.
|
|
"""
|
|
|
|
@component.output_types(value=int)
|
|
def run(self, value: int):
|
|
"""
|
|
Doubles the input value.
|
|
"""
|
|
return {"value": value * 2}
|