sie-haystack 0.1.10__tar.gz → 0.2.0__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- {sie_haystack-0.1.10 → sie_haystack-0.2.0}/PKG-INFO +22 -2
- {sie_haystack-0.1.10 → sie_haystack-0.2.0}/README.md +21 -1
- {sie_haystack-0.1.10 → sie_haystack-0.2.0}/pyproject.toml +2 -2
- sie_haystack-0.2.0/src/haystack_integrations/components/embedders/sie/__init__.py +25 -0
- sie_haystack-0.2.0/src/haystack_integrations/components/extractors/sie/__init__.py +11 -0
- sie_haystack-0.2.0/src/haystack_integrations/components/rankers/sie/__init__.py +5 -0
- sie_haystack-0.2.0/tests/test_namespace_aliases.py +73 -0
- {sie_haystack-0.1.10 → sie_haystack-0.2.0}/.gitignore +0 -0
- {sie_haystack-0.1.10 → sie_haystack-0.2.0}/src/sie_haystack/__init__.py +0 -0
- {sie_haystack-0.1.10 → sie_haystack-0.2.0}/src/sie_haystack/embedders.py +0 -0
- {sie_haystack-0.1.10 → sie_haystack-0.2.0}/src/sie_haystack/extractors.py +0 -0
- {sie_haystack-0.1.10 → sie_haystack-0.2.0}/src/sie_haystack/rankers.py +0 -0
- {sie_haystack-0.1.10 → sie_haystack-0.2.0}/tests/__init__.py +0 -0
- {sie_haystack-0.1.10 → sie_haystack-0.2.0}/tests/conftest.py +0 -0
- {sie_haystack-0.1.10 → sie_haystack-0.2.0}/tests/test_embedders.py +0 -0
- {sie_haystack-0.1.10 → sie_haystack-0.2.0}/tests/test_extractors.py +0 -0
- {sie_haystack-0.1.10 → sie_haystack-0.2.0}/tests/test_integration.py +0 -0
- {sie_haystack-0.1.10 → sie_haystack-0.2.0}/tests/test_rankers.py +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: sie-haystack
|
|
3
|
-
Version: 0.
|
|
3
|
+
Version: 0.2.0
|
|
4
4
|
Summary: SIE integration for Haystack
|
|
5
5
|
Author-email: Superlinked <dev@superlinked.com>
|
|
6
6
|
License: Apache-2.0
|
|
@@ -30,11 +30,31 @@ SIE integration for Haystack.
|
|
|
30
30
|
pip install sie-haystack
|
|
31
31
|
```
|
|
32
32
|
|
|
33
|
+
## Imports
|
|
34
|
+
|
|
35
|
+
Preferred import paths follow Haystack's namespace convention:
|
|
36
|
+
|
|
37
|
+
```python
|
|
38
|
+
from haystack_integrations.components.embedders.sie import (
|
|
39
|
+
SIEDocumentEmbedder,
|
|
40
|
+
SIETextEmbedder,
|
|
41
|
+
)
|
|
42
|
+
from haystack_integrations.components.rankers.sie import SIERanker
|
|
43
|
+
from haystack_integrations.components.extractors.sie import SIEExtractor
|
|
44
|
+
```
|
|
45
|
+
|
|
46
|
+
The legacy flat imports remain supported for compatibility:
|
|
47
|
+
|
|
48
|
+
```python
|
|
49
|
+
from sie_haystack import SIEDocumentEmbedder, SIEExtractor, SIERanker, SIETextEmbedder
|
|
50
|
+
```
|
|
51
|
+
|
|
33
52
|
## Usage
|
|
34
53
|
|
|
35
54
|
```python
|
|
36
55
|
from haystack import Document
|
|
37
|
-
from
|
|
56
|
+
from haystack_integrations.components.embedders.sie import SIEDocumentEmbedder, SIETextEmbedder
|
|
57
|
+
from haystack_integrations.components.rankers.sie import SIERanker
|
|
38
58
|
|
|
39
59
|
# Embed a query
|
|
40
60
|
text_embedder = SIETextEmbedder(base_url="http://localhost:8080", model="BAAI/bge-m3")
|
|
@@ -8,11 +8,31 @@ SIE integration for Haystack.
|
|
|
8
8
|
pip install sie-haystack
|
|
9
9
|
```
|
|
10
10
|
|
|
11
|
+
## Imports
|
|
12
|
+
|
|
13
|
+
Preferred import paths follow Haystack's namespace convention:
|
|
14
|
+
|
|
15
|
+
```python
|
|
16
|
+
from haystack_integrations.components.embedders.sie import (
|
|
17
|
+
SIEDocumentEmbedder,
|
|
18
|
+
SIETextEmbedder,
|
|
19
|
+
)
|
|
20
|
+
from haystack_integrations.components.rankers.sie import SIERanker
|
|
21
|
+
from haystack_integrations.components.extractors.sie import SIEExtractor
|
|
22
|
+
```
|
|
23
|
+
|
|
24
|
+
The legacy flat imports remain supported for compatibility:
|
|
25
|
+
|
|
26
|
+
```python
|
|
27
|
+
from sie_haystack import SIEDocumentEmbedder, SIEExtractor, SIERanker, SIETextEmbedder
|
|
28
|
+
```
|
|
29
|
+
|
|
11
30
|
## Usage
|
|
12
31
|
|
|
13
32
|
```python
|
|
14
33
|
from haystack import Document
|
|
15
|
-
from
|
|
34
|
+
from haystack_integrations.components.embedders.sie import SIEDocumentEmbedder, SIETextEmbedder
|
|
35
|
+
from haystack_integrations.components.rankers.sie import SIERanker
|
|
16
36
|
|
|
17
37
|
# Embed a query
|
|
18
38
|
text_embedder = SIETextEmbedder(base_url="http://localhost:8080", model="BAAI/bge-m3")
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
[project]
|
|
2
2
|
name = "sie-haystack"
|
|
3
|
-
version = "0.
|
|
3
|
+
version = "0.2.0"
|
|
4
4
|
description = "SIE integration for Haystack"
|
|
5
5
|
readme = "README.md"
|
|
6
6
|
requires-python = ">=3.10"
|
|
@@ -33,7 +33,7 @@ requires = ["hatchling"]
|
|
|
33
33
|
build-backend = "hatchling.build"
|
|
34
34
|
|
|
35
35
|
[tool.hatch.build.targets.wheel]
|
|
36
|
-
packages = ["src/sie_haystack"]
|
|
36
|
+
packages = ["src/sie_haystack", "src/haystack_integrations"]
|
|
37
37
|
|
|
38
38
|
[tool.pytest.ini_options]
|
|
39
39
|
asyncio_mode = "auto"
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
"""Haystack namespace exports for SIE embedders.
|
|
2
|
+
|
|
3
|
+
This mirrors Haystack's `haystack_integrations.components.*` convention
|
|
4
|
+
while keeping the existing `sie_haystack` imports available.
|
|
5
|
+
"""
|
|
6
|
+
|
|
7
|
+
from sie_haystack.embedders import (
|
|
8
|
+
SIEDocumentEmbedder,
|
|
9
|
+
SIEImageEmbedder,
|
|
10
|
+
SIEMultivectorDocumentEmbedder,
|
|
11
|
+
SIEMultivectorTextEmbedder,
|
|
12
|
+
SIESparseDocumentEmbedder,
|
|
13
|
+
SIESparseTextEmbedder,
|
|
14
|
+
SIETextEmbedder,
|
|
15
|
+
)
|
|
16
|
+
|
|
17
|
+
__all__ = [
|
|
18
|
+
"SIEDocumentEmbedder",
|
|
19
|
+
"SIEImageEmbedder",
|
|
20
|
+
"SIEMultivectorDocumentEmbedder",
|
|
21
|
+
"SIEMultivectorTextEmbedder",
|
|
22
|
+
"SIESparseDocumentEmbedder",
|
|
23
|
+
"SIESparseTextEmbedder",
|
|
24
|
+
"SIETextEmbedder",
|
|
25
|
+
]
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
"""Haystack namespace exports for SIE extractors."""
|
|
2
|
+
|
|
3
|
+
from sie_haystack.extractors import Classification, DetectedObject, Entity, Relation, SIEExtractor
|
|
4
|
+
|
|
5
|
+
__all__ = [
|
|
6
|
+
"Classification",
|
|
7
|
+
"DetectedObject",
|
|
8
|
+
"Entity",
|
|
9
|
+
"Relation",
|
|
10
|
+
"SIEExtractor",
|
|
11
|
+
]
|
|
@@ -0,0 +1,73 @@
|
|
|
1
|
+
"""Tests for Haystack namespace alias exports."""
|
|
2
|
+
|
|
3
|
+
from haystack_integrations.components.embedders.sie import (
|
|
4
|
+
SIEDocumentEmbedder as NamespacedDocumentEmbedder,
|
|
5
|
+
)
|
|
6
|
+
from haystack_integrations.components.embedders.sie import (
|
|
7
|
+
SIEImageEmbedder as NamespacedImageEmbedder,
|
|
8
|
+
)
|
|
9
|
+
from haystack_integrations.components.embedders.sie import (
|
|
10
|
+
SIEMultivectorDocumentEmbedder as NamespacedMultivectorDocumentEmbedder,
|
|
11
|
+
)
|
|
12
|
+
from haystack_integrations.components.embedders.sie import (
|
|
13
|
+
SIEMultivectorTextEmbedder as NamespacedMultivectorTextEmbedder,
|
|
14
|
+
)
|
|
15
|
+
from haystack_integrations.components.embedders.sie import (
|
|
16
|
+
SIESparseDocumentEmbedder as NamespacedSparseDocumentEmbedder,
|
|
17
|
+
)
|
|
18
|
+
from haystack_integrations.components.embedders.sie import (
|
|
19
|
+
SIESparseTextEmbedder as NamespacedSparseTextEmbedder,
|
|
20
|
+
)
|
|
21
|
+
from haystack_integrations.components.embedders.sie import (
|
|
22
|
+
SIETextEmbedder as NamespacedTextEmbedder,
|
|
23
|
+
)
|
|
24
|
+
from haystack_integrations.components.extractors.sie import (
|
|
25
|
+
Classification as NamespacedClassification,
|
|
26
|
+
)
|
|
27
|
+
from haystack_integrations.components.extractors.sie import (
|
|
28
|
+
DetectedObject as NamespacedDetectedObject,
|
|
29
|
+
)
|
|
30
|
+
from haystack_integrations.components.extractors.sie import (
|
|
31
|
+
Entity as NamespacedEntity,
|
|
32
|
+
)
|
|
33
|
+
from haystack_integrations.components.extractors.sie import (
|
|
34
|
+
Relation as NamespacedRelation,
|
|
35
|
+
)
|
|
36
|
+
from haystack_integrations.components.extractors.sie import (
|
|
37
|
+
SIEExtractor as NamespacedExtractor,
|
|
38
|
+
)
|
|
39
|
+
from haystack_integrations.components.rankers.sie import SIERanker as NamespacedRanker
|
|
40
|
+
from sie_haystack import (
|
|
41
|
+
SIEDocumentEmbedder,
|
|
42
|
+
SIEExtractor,
|
|
43
|
+
SIEImageEmbedder,
|
|
44
|
+
SIEMultivectorDocumentEmbedder,
|
|
45
|
+
SIEMultivectorTextEmbedder,
|
|
46
|
+
SIERanker,
|
|
47
|
+
SIESparseDocumentEmbedder,
|
|
48
|
+
SIESparseTextEmbedder,
|
|
49
|
+
SIETextEmbedder,
|
|
50
|
+
)
|
|
51
|
+
from sie_haystack.extractors import Classification, DetectedObject, Entity, Relation
|
|
52
|
+
|
|
53
|
+
|
|
54
|
+
def test_namespaced_embedder_exports_match_flat_exports() -> None:
|
|
55
|
+
assert NamespacedTextEmbedder is SIETextEmbedder
|
|
56
|
+
assert NamespacedDocumentEmbedder is SIEDocumentEmbedder
|
|
57
|
+
assert NamespacedSparseTextEmbedder is SIESparseTextEmbedder
|
|
58
|
+
assert NamespacedSparseDocumentEmbedder is SIESparseDocumentEmbedder
|
|
59
|
+
assert NamespacedMultivectorTextEmbedder is SIEMultivectorTextEmbedder
|
|
60
|
+
assert NamespacedMultivectorDocumentEmbedder is SIEMultivectorDocumentEmbedder
|
|
61
|
+
assert NamespacedImageEmbedder is SIEImageEmbedder
|
|
62
|
+
|
|
63
|
+
|
|
64
|
+
def test_namespaced_ranker_export_matches_flat_export() -> None:
|
|
65
|
+
assert NamespacedRanker is SIERanker
|
|
66
|
+
|
|
67
|
+
|
|
68
|
+
def test_namespaced_extractor_exports_match_flat_exports() -> None:
|
|
69
|
+
assert NamespacedExtractor is SIEExtractor
|
|
70
|
+
assert NamespacedEntity is Entity
|
|
71
|
+
assert NamespacedRelation is Relation
|
|
72
|
+
assert NamespacedClassification is Classification
|
|
73
|
+
assert NamespacedDetectedObject is DetectedObject
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|