• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

deepset-ai / haystack / 15728163096

18 Jun 2025 08:44AM UTC coverage: 90.154% (+0.009%) from 90.145%
15728163096

Pull #9337

github

web-flow
Merge 987f98a24 into a16ee9600
Pull Request #9337: feat: add resource name for Haystack Component Datadog spans

11564 of 12827 relevant lines covered (90.15%)

0.9 hits per line

Source File
Press 'n' to go to next uncovered line, 'b' for previous

0.0
haystack/components/embedders/types/protocol.py
1
# SPDX-FileCopyrightText: 2022-present deepset GmbH <info@deepset.ai>
2
#
3
# SPDX-License-Identifier: Apache-2.0
4

5
from typing import Any, Dict, Protocol
×
6

7
# See https://github.com/pylint-dev/pylint/issues/9319.
8
# pylint: disable=unnecessary-ellipsis
9

10

11
class TextEmbedder(Protocol):
×
12
    """
13
    Protocol for Text Embedders.
14
    """
15

16
    def run(self, text: str) -> Dict[str, Any]:
×
17
        """
18
        Generate embeddings for the input text.
19

20
        Implementing classes may accept additional optional parameters in their run method.
21
        For example: `def run (self, text: str, param_a="default", param_b="another_default")`.
22

23
        :param text:
24
            The input text to be embedded.
25
        :returns:
26
            A dictionary containing the keys:
27
                - 'embedding', which is expected to be a List[float] representing the embedding.
28
                - any optional keys such as 'metadata'.
29
        """
30
        ...
×
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2025 Coveralls, Inc