Coverage for haystack/dataclasses/__init__.py: 100%
5 statements
« prev ^ index » next coverage.py v7.15.4, created at 2026-08-21 13:53 +0000
« prev ^ index » next coverage.py v7.15.4, created at 2026-08-21 13:53 +0000
1# SPDX-FileCopyrightText: 2022-present deepset GmbH <info@deepset.ai>
2#
3# SPDX-License-Identifier: Apache-2.0
5import sys
6from typing import TYPE_CHECKING
8from lazy_imports import LazyImporter
10_import_structure = {
11 "answer": ["Answer", "ExtractedAnswer", "GeneratedAnswer"],
12 "breakpoints": ["Breakpoint", "PipelineSnapshot", "PipelineState"],
13 "byte_stream": ["ByteStream"],
14 "chat_message": ["ChatMessage", "ChatRole", "ReasoningContent", "TextContent", "ToolCall", "ToolCallResult"],
15 "image_content": ["ImageContent"],
16 "file_content": ["FileContent"],
17 "document": ["Document"],
18 "skill_info": ["SkillInfo"],
19 "sparse_embedding": ["SparseEmbedding"],
20 "streaming_chunk": [
21 "AsyncStreamingCallbackT",
22 "ComponentInfo",
23 "FinishReason",
24 "StreamingCallbackT",
25 "StreamingChunk",
26 "SyncStreamingCallbackT",
27 "ToolCallDelta",
28 "select_streaming_callback",
29 ],
30}
32if TYPE_CHECKING:
33 from .answer import Answer as Answer
34 from .answer import ExtractedAnswer as ExtractedAnswer
35 from .answer import GeneratedAnswer as GeneratedAnswer
36 from .breakpoints import Breakpoint as Breakpoint
37 from .breakpoints import PipelineSnapshot as PipelineSnapshot
38 from .breakpoints import PipelineState as PipelineState
39 from .byte_stream import ByteStream as ByteStream
40 from .chat_message import ChatMessage as ChatMessage
41 from .chat_message import ChatRole as ChatRole
42 from .chat_message import ReasoningContent as ReasoningContent
43 from .chat_message import TextContent as TextContent
44 from .chat_message import ToolCall as ToolCall
45 from .chat_message import ToolCallResult as ToolCallResult
46 from .document import Document as Document
47 from .file_content import FileContent as FileContent
48 from .image_content import ImageContent as ImageContent
49 from .skill_info import SkillInfo as SkillInfo
50 from .sparse_embedding import SparseEmbedding as SparseEmbedding
51 from .streaming_chunk import AsyncStreamingCallbackT as AsyncStreamingCallbackT
52 from .streaming_chunk import ComponentInfo as ComponentInfo
53 from .streaming_chunk import FinishReason as FinishReason
54 from .streaming_chunk import StreamingCallbackT as StreamingCallbackT
55 from .streaming_chunk import StreamingChunk as StreamingChunk
56 from .streaming_chunk import SyncStreamingCallbackT as SyncStreamingCallbackT
57 from .streaming_chunk import ToolCallDelta as ToolCallDelta
58 from .streaming_chunk import select_streaming_callback as select_streaming_callback
59else:
60 sys.modules[__name__] = LazyImporter(name=__name__, module_file=__file__, import_structure=_import_structure)