edenai-haystack 0.1.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.
@@ -0,0 +1,146 @@
1
+ # Byte-compiled / optimized / DLL files
2
+ __pycache__/
3
+ *.py[cod]
4
+ *$py.class
5
+
6
+ # C extensions
7
+ *.so
8
+
9
+ # Distribution / packaging
10
+ .Python
11
+ build/
12
+ develop-eggs/
13
+ dist/
14
+ downloads/
15
+ eggs/
16
+ .eggs/
17
+ lib/
18
+ lib64/
19
+ parts/
20
+ sdist/
21
+ var/
22
+ wheels/
23
+ pip-wheel-metadata/
24
+ share/python-wheels/
25
+ *.egg-info/
26
+ .installed.cfg
27
+ *.egg
28
+ MANIFEST
29
+
30
+ # PyInstaller
31
+ # Usually these files are written by a python script from a template
32
+ # before PyInstaller builds the exe, so as to inject date/other infos into it.
33
+ *.manifest
34
+ *.spec
35
+
36
+ # Installer logs
37
+ pip-log.txt
38
+ pip-delete-this-directory.txt
39
+
40
+ # Unit test / coverage reports
41
+ htmlcov/
42
+ .tox/
43
+ .nox/
44
+ .coverage
45
+ .coverage.*
46
+ .cache
47
+ nosetests.xml
48
+ coverage.xml
49
+ *.cover
50
+ *.py,cover
51
+ .hypothesis/
52
+ .pytest_cache/
53
+ volumes/
54
+
55
+ # Translations
56
+ *.mo
57
+ *.pot
58
+
59
+ # Django stuff:
60
+ *.log
61
+ local_settings.py
62
+ db.sqlite3
63
+ db.sqlite3-journal
64
+
65
+ # Flask stuff:
66
+ instance/
67
+ .webassets-cache
68
+
69
+ # Scrapy stuff:
70
+ .scrapy
71
+
72
+ # Sphinx documentation
73
+ docs/_build/
74
+
75
+ # PyBuilder
76
+ target/
77
+
78
+ # Jupyter Notebook
79
+ .ipynb_checkpoints
80
+
81
+ # IPython
82
+ profile_default/
83
+ ipython_config.py
84
+
85
+ # pyenv
86
+ .python-version
87
+
88
+ # pipenv
89
+ # According to pypa/pipenv#598, it is recommended to include Pipfile.lock in version control.
90
+ # However, in case of collaboration, if having platform-specific dependencies or dependencies
91
+ # having no cross-platform support, pipenv may install dependencies that don't work, or not
92
+ # install all needed dependencies.
93
+ #Pipfile.lock
94
+
95
+ # PEP 582; used by e.g. github.com/David-OConnor/pyflow
96
+ __pypackages__/
97
+
98
+ # Celery stuff
99
+ celerybeat-schedule
100
+ celerybeat.pid
101
+
102
+ # SageMath parsed files
103
+ *.sage.py
104
+
105
+ # Environments
106
+ .env
107
+ .venv
108
+ env/
109
+ venv/
110
+ ENV/
111
+ env.bak/
112
+ venv.bak/
113
+
114
+ # Spyder project settings
115
+ .spyderproject
116
+ .spyproject
117
+
118
+ # Rope project settings
119
+ .ropeproject
120
+
121
+ # mkdocs documentation
122
+ /site
123
+
124
+ # mypy
125
+ .mypy_cache/
126
+ .dmypy.json
127
+ dmypy.json
128
+
129
+ # Pyre type checker
130
+ .pyre/
131
+
132
+ # IDEs
133
+ .vscode
134
+
135
+ # Docs generation artifacts
136
+ _readme_*.md
137
+ .idea
138
+
139
+ # macOS
140
+ .DS_Store
141
+
142
+ # http cache (requests-cache)
143
+ **/http_cache.sqlite
144
+
145
+ # ruff
146
+ .ruff_cache
@@ -0,0 +1,192 @@
1
+ Apache License
2
+ Version 2.0, January 2004
3
+ http://www.apache.org/licenses/
4
+
5
+ TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
6
+
7
+ 1. Definitions.
8
+
9
+ "License" shall mean the terms and conditions for use, reproduction,
10
+ and distribution as defined by Sections 1 through 9 of this document.
11
+
12
+ "Licensor" shall mean the copyright owner or entity granting the License.
13
+
14
+ "Legal Entity" shall mean the union of the acting entity and all
15
+ other entities that control, are controlled by, or are under common
16
+ control with that entity. For the purposes of this definition,
17
+ "control" means (i) the power, direct or indirect, to cause the
18
+ direction or management of such entity, whether by contract or
19
+ otherwise, or (ii) ownership of fifty percent (50%) or more of the
20
+ outstanding shares, or (iii) beneficial ownership of such entity.
21
+
22
+ "You" (or "Your") shall mean an individual or Legal Entity
23
+ exercising permissions granted by this License.
24
+
25
+ "Source" form shall mean the preferred form for making modifications,
26
+ including but not limited to software source code, documentation
27
+ source, and configuration files.
28
+
29
+ "Object" form shall mean any form resulting from mechanical
30
+ transformation or translation of a Source form, including but
31
+ not limited to compiled object code, generated documentation,
32
+ and conversions to other media types.
33
+
34
+ "Work" shall mean the work of authorship, whether in Source or
35
+ Object form, made available under the License, as indicated by a
36
+ copyright notice that is included in or attached to the work
37
+ (which shall not include communications that are marked or
38
+ designated in writing by the copyright owner as "Not a Contribution").
39
+
40
+ "Contribution" shall mean any work of authorship, including
41
+ the original version of the Work and any modifications or additions
42
+ to that Work or Derivative Works thereof, that is intentionally
43
+ submitted to Licensor for inclusion in the Work by the copyright owner
44
+ or by an individual or Legal Entity authorized to submit on behalf of
45
+ the copyright owner. For the purposes of this definition, "submitted"
46
+ means any form of electronic, verbal, or written communication sent
47
+ to the Licensor or its representatives, including but not limited to
48
+ communication on electronic mailing lists, source code control
49
+ systems, and issue tracking systems that are managed by, or on behalf
50
+ of, the Licensor for the purpose of discussing and improving the Work,
51
+ but excluding communication that is conspicuously marked or otherwise
52
+ designated in writing by the copyright owner as "Not a Contribution".
53
+
54
+ "Contributor" shall mean Licensor and any individual or Legal Entity
55
+ on behalf of whom a Contribution has been received by Licensor and
56
+ subsequently incorporated within the Work.
57
+
58
+ 2. Grant of Copyright License. Subject to the terms and conditions of
59
+ this License, each Contributor hereby grants to You a perpetual,
60
+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable
61
+ copyright license to use, reproduce, modify, distribute, and prepare
62
+ Derivative Works of, publicly display, publicly perform, sublicense,
63
+ and distribute the Work and such Derivative Works in Source or Object
64
+ form.
65
+
66
+ 3. Grant of Patent License. Subject to the terms and conditions of
67
+ this License, each Contributor hereby grants to You a perpetual,
68
+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable
69
+ (except as stated in this section) patent license to make, have made,
70
+ use, offer to sell, sell, import, and otherwise transfer the Work,
71
+ where such license applies only to those patent claims licensable
72
+ by such Contributor that are necessarily infringed by their
73
+ Contribution(s) alone or by combination of their Contribution(s)
74
+ with the Work to which such Contribution(s) was submitted. If You
75
+ institute patent litigation against any entity (including a
76
+ cross-claim or counterclaim in a lawsuit) alleging that the Work
77
+ or a Contribution incorporated within the Work constitutes direct
78
+ or contributory patent infringement, then any patent licenses
79
+ granted to You under this License for that Work shall terminate
80
+ as of the date such litigation is filed.
81
+
82
+ 4. Redistribution. You may reproduce and distribute copies of the
83
+ Work or Derivative Works thereof in any medium, with or without
84
+ modifications, and in Source or Object form, provided that You
85
+ meet the following conditions:
86
+
87
+ (a) You must give any other recipients of the Work or
88
+ Derivative Works a copy of this License; and
89
+
90
+ (b) You must cause any modified files to carry prominent notices
91
+ stating that You changed the files; and
92
+
93
+ (c) You must retain, in the Source form of any Derivative Works
94
+ that You distribute, all copyright, trademark, patent,
95
+ attribution and other notices from the Source form of the Work,
96
+ excluding those notices that do not pertain to any part of
97
+ the Derivative Works; and
98
+
99
+ (d) If the Work includes a "NOTICE" text file as part of its
100
+ distribution, then any Derivative Works that You distribute must
101
+ include a readable copy of the attribution notices contained
102
+ within such NOTICE file, excluding those notices that do not
103
+ pertain to any part of the Derivative Works, in at least one
104
+ of the following places: within a NOTICE text file distributed
105
+ as part of the Derivative Works; within the Source form or
106
+ documentation, if provided along with the Derivative Works; or,
107
+ within a display generated by the Derivative Works, if and
108
+ wherever such third-party notices normally appear. The contents
109
+ of the NOTICE file are for informational purposes only and
110
+ do not modify the License. You may add Your own attribution
111
+ notices within Derivative Works that You distribute, alongside
112
+ or as an addendum to the NOTICE text from the Work, provided
113
+ that such additional attribution notices cannot be construed
114
+ as modifying the License.
115
+
116
+ You may add Your own copyright notice to Your modifications and
117
+ may provide additional or different license terms and conditions
118
+ for use, reproduction, or distribution of Your modifications, or
119
+ for any such Derivative Works as a whole, provided Your use,
120
+ reproduction, and distribution of the Work otherwise complies with
121
+ the conditions stated in this License.
122
+
123
+ 5. Submission of Contributions. Unless You explicitly state otherwise,
124
+ any Contribution intentionally submitted for inclusion in the Work
125
+ by You to the Licensor shall be under the terms and conditions of
126
+ this License, without any additional terms or conditions.
127
+ Notwithstanding the above, nothing herein shall supersede or modify
128
+ the terms of any separate license agreement you may have executed
129
+ with Licensor regarding such Contributions.
130
+
131
+ 6. Trademarks. This License does not grant permission to use the trade
132
+ names, trademarks, service marks, or product names of the Licensor,
133
+ except as required for reasonable and customary use in describing the
134
+ origin of the Work and reproducing the content of the NOTICE file.
135
+
136
+ 7. Disclaimer of Warranty. Unless required by applicable law or
137
+ agreed to in writing, Licensor provides the Work (and each
138
+ Contributor provides its Contributions) on an "AS IS" BASIS,
139
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
140
+ implied, including, without limitation, any warranties or conditions
141
+ of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
142
+ PARTICULAR PURPOSE. You are solely responsible for determining the
143
+ appropriateness of using or redistributing the Work and assume any
144
+ risks associated with Your exercise of permissions under this License.
145
+
146
+ 8. Limitation of Liability. In no event and under no legal theory,
147
+ whether in tort (including negligence), contract, or otherwise,
148
+ unless required by applicable law (such as deliberate and grossly
149
+ negligent acts) or agreed to in writing, shall any Contributor be
150
+ liable to You for damages, including any direct, indirect, special,
151
+ incidental, or consequential damages of any character arising as a
152
+ result of this License or out of the use or inability to use the
153
+ Work (including but not limited to damages for loss of goodwill,
154
+ work stoppage, computer failure or malfunction, or any and all
155
+ other commercial damages or losses), even if such Contributor
156
+ has been advised of the possibility of such damages.
157
+
158
+ 9. Accepting Warranty or Support. You may choose to offer, and to
159
+ charge a fee for, warranty, support, indemnity or other liability
160
+ obligations and/or rights consistent with this License. However, in
161
+ accepting such obligations, You may act only on Your own behalf and on
162
+ Your sole responsibility, not on behalf of any other Contributor, and
163
+ only if You agree to indemnify, defend, and hold each Contributor
164
+ harmless for any liability incurred by, or claims asserted against,
165
+ such Contributor by reason of your accepting any such warranty or support.
166
+
167
+ END OF TERMS AND CONDITIONS
168
+
169
+ APPENDIX: How to apply the Apache License to your work.
170
+
171
+ To apply the Apache License to your work, attach the following
172
+ boilerplate notice, with the fields enclosed by brackets "[]"
173
+ replaced with your own identifying information. (Don't include
174
+ the brackets!) The text should be enclosed in the appropriate
175
+ comment syntax for the file format. We also recommend that a
176
+ file or class name and description of purpose be included on the
177
+ same page as the copyright notice for easier identification within
178
+ third-party archives.
179
+
180
+ Copyright 2023-present deepset GmbH
181
+
182
+ Licensed under the Apache License, Version 2.0 (the "License");
183
+ you may not use this file except in compliance with the License.
184
+ You may obtain a copy of the License at
185
+
186
+ http://www.apache.org/licenses/LICENSE-2.0
187
+
188
+ Unless required by applicable law or agreed to in writing, software
189
+ distributed under the License is distributed on an "AS IS" BASIS,
190
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
191
+ See the License for the specific language governing permissions and
192
+ limitations under the License.
@@ -0,0 +1,41 @@
1
+ Metadata-Version: 2.4
2
+ Name: edenai-haystack
3
+ Version: 0.1.0
4
+ Summary: Use Eden AI with Haystack to build AI applications with 500+ AI models through one unified, OpenAI-compatible API.
5
+ Project-URL: Documentation, https://github.com/deepset-ai/haystack-core-integrations/tree/main/integrations/edenai#readme
6
+ Project-URL: Issues, https://github.com/deepset-ai/haystack-core-integrations/issues
7
+ Project-URL: Source, https://github.com/deepset-ai/haystack-core-integrations/tree/main/integrations/edenai
8
+ Author-email: deepset GmbH <info@deepset.ai>, Eden AI <tech@edenai.co>
9
+ License-Expression: Apache-2.0
10
+ License-File: LICENSE.txt
11
+ Classifier: Development Status :: 4 - Beta
12
+ Classifier: License :: OSI Approved :: Apache Software License
13
+ Classifier: Programming Language :: Python
14
+ Classifier: Programming Language :: Python :: 3.10
15
+ Classifier: Programming Language :: Python :: 3.11
16
+ Classifier: Programming Language :: Python :: 3.12
17
+ Classifier: Programming Language :: Python :: 3.13
18
+ Classifier: Programming Language :: Python :: 3.14
19
+ Classifier: Programming Language :: Python :: Implementation :: CPython
20
+ Classifier: Programming Language :: Python :: Implementation :: PyPy
21
+ Requires-Python: >=3.10
22
+ Requires-Dist: haystack-ai>=2.30.0
23
+ Description-Content-Type: text/markdown
24
+
25
+ # edenai-haystack
26
+
27
+ [![PyPI - Version](https://img.shields.io/pypi/v/edenai-haystack.svg)](https://pypi.org/project/edenai-haystack)
28
+ [![PyPI - Python Version](https://img.shields.io/pypi/pyversions/edenai-haystack.svg)](https://pypi.org/project/edenai-haystack)
29
+
30
+ [Eden AI](https://www.edenai.co/) integration for Haystack: reach 500+ models (OpenAI, Anthropic, Mistral, Google, Cohere, and more) through one OpenAI-compatible, EU-hosted API key.
31
+
32
+ - [Integration page](https://haystack.deepset.ai/integrations/edenai)
33
+ - [Changelog](https://github.com/deepset-ai/haystack-core-integrations/blob/main/integrations/edenai/CHANGELOG.md)
34
+
35
+ ---
36
+
37
+ ## Contributing
38
+
39
+ Refer to the general [Contribution Guidelines](https://github.com/deepset-ai/haystack-core-integrations/blob/main/CONTRIBUTING.md).
40
+
41
+ To run the integration tests locally, export the `EDENAI_API_KEY` environment variable.
@@ -0,0 +1,17 @@
1
+ # edenai-haystack
2
+
3
+ [![PyPI - Version](https://img.shields.io/pypi/v/edenai-haystack.svg)](https://pypi.org/project/edenai-haystack)
4
+ [![PyPI - Python Version](https://img.shields.io/pypi/pyversions/edenai-haystack.svg)](https://pypi.org/project/edenai-haystack)
5
+
6
+ [Eden AI](https://www.edenai.co/) integration for Haystack: reach 500+ models (OpenAI, Anthropic, Mistral, Google, Cohere, and more) through one OpenAI-compatible, EU-hosted API key.
7
+
8
+ - [Integration page](https://haystack.deepset.ai/integrations/edenai)
9
+ - [Changelog](https://github.com/deepset-ai/haystack-core-integrations/blob/main/integrations/edenai/CHANGELOG.md)
10
+
11
+ ---
12
+
13
+ ## Contributing
14
+
15
+ Refer to the general [Contribution Guidelines](https://github.com/deepset-ai/haystack-core-integrations/blob/main/CONTRIBUTING.md).
16
+
17
+ To run the integration tests locally, export the `EDENAI_API_KEY` environment variable.
@@ -0,0 +1,49 @@
1
+ # SPDX-FileCopyrightText: 2023-present deepset GmbH <info@deepset.ai>
2
+ #
3
+ # SPDX-License-Identifier: Apache-2.0
4
+
5
+ # A minimal RAG pipeline using Eden AI as the (EU-hosted, multi-provider) chat backend.
6
+ #
7
+ # Prerequisites:
8
+ # pip install edenai-haystack
9
+ # export EDENAI_API_KEY="<your Eden AI API key>"
10
+
11
+ from haystack import Document, Pipeline
12
+ from haystack.components.builders import ChatPromptBuilder
13
+ from haystack.components.retrievers.in_memory import InMemoryBM25Retriever
14
+ from haystack.dataclasses import ChatMessage
15
+ from haystack.document_stores.in_memory import InMemoryDocumentStore
16
+
17
+ from haystack_integrations.components.generators.edenai import EdenAIChatGenerator
18
+
19
+ # 1. Tiny in-memory knowledge base
20
+ document_store = InMemoryDocumentStore()
21
+ document_store.write_documents(
22
+ [
23
+ Document(content="Eden AI is a unified API that routes to 500+ AI models with EU data residency."),
24
+ Document(content="Haystack is an open-source framework by deepset to build LLM and RAG applications."),
25
+ Document(content="The capital of France is Paris."),
26
+ ]
27
+ )
28
+
29
+ # 2. Build the RAG pipeline
30
+ template = [
31
+ ChatMessage.from_user(
32
+ "Given these documents, answer the question.\n"
33
+ "Documents:\n{% for doc in documents %}{{ doc.content }}\n{% endfor %}\n"
34
+ "Question: {{ question }}\nAnswer:"
35
+ )
36
+ ]
37
+
38
+ pipeline = Pipeline()
39
+ pipeline.add_component("retriever", InMemoryBM25Retriever(document_store=document_store))
40
+ pipeline.add_component("prompt_builder", ChatPromptBuilder(template=template, required_variables=["question"]))
41
+ # Swap the model for any Eden AI `provider/model`, e.g. "mistral/mistral-large-latest" for an EU-hosted model.
42
+ pipeline.add_component("llm", EdenAIChatGenerator(model="openai/gpt-4o-mini"))
43
+
44
+ pipeline.connect("retriever", "prompt_builder.documents")
45
+ pipeline.connect("prompt_builder.prompt", "llm.messages")
46
+
47
+ question = "What is Eden AI?"
48
+ result = pipeline.run({"retriever": {"query": question}, "prompt_builder": {"question": question}})
49
+ print(result["llm"]["replies"][0].text)
@@ -0,0 +1,15 @@
1
+ loaders:
2
+ - modules:
3
+ - haystack_integrations.components.generators.edenai.chat.chat_generator
4
+ - haystack_integrations.components.embedders.edenai.text_embedder
5
+ - haystack_integrations.components.embedders.edenai.document_embedder
6
+ search_path: [../src]
7
+ processors:
8
+ - type: filter
9
+ documented_only: true
10
+ skip_empty_modules: true
11
+ renderer:
12
+ description: Eden AI integration for Haystack
13
+ id: integrations-edenai
14
+ filename: edenai.md
15
+ title: Eden AI
@@ -0,0 +1,179 @@
1
+ [build-system]
2
+ requires = ["hatchling", "hatch-vcs"]
3
+ build-backend = "hatchling.build"
4
+
5
+ [project]
6
+ name = "edenai-haystack"
7
+ dynamic = ["version"]
8
+ description = 'Use Eden AI with Haystack to build AI applications with 500+ AI models through one unified, OpenAI-compatible API.'
9
+ readme = "README.md"
10
+ requires-python = ">=3.10"
11
+ license = "Apache-2.0"
12
+ keywords = []
13
+ authors = [
14
+ { name = "deepset GmbH", email = "info@deepset.ai" },
15
+ { name = "Eden AI", email = "tech@edenai.co" }
16
+ ]
17
+ classifiers = [
18
+ "License :: OSI Approved :: Apache Software License",
19
+ "Development Status :: 4 - Beta",
20
+ "Programming Language :: Python",
21
+ "Programming Language :: Python :: 3.10",
22
+ "Programming Language :: Python :: 3.11",
23
+ "Programming Language :: Python :: 3.12",
24
+ "Programming Language :: Python :: 3.13",
25
+ "Programming Language :: Python :: 3.14",
26
+ "Programming Language :: Python :: Implementation :: CPython",
27
+ "Programming Language :: Python :: Implementation :: PyPy",
28
+ ]
29
+ dependencies = ["haystack-ai>=2.30.0"]
30
+
31
+ [project.urls]
32
+ Documentation = "https://github.com/deepset-ai/haystack-core-integrations/tree/main/integrations/edenai#readme"
33
+ Issues = "https://github.com/deepset-ai/haystack-core-integrations/issues"
34
+ Source = "https://github.com/deepset-ai/haystack-core-integrations/tree/main/integrations/edenai"
35
+
36
+ [tool.hatch.build.targets.wheel]
37
+ packages = ["src/haystack_integrations"]
38
+
39
+ [tool.hatch.version]
40
+ source = "vcs"
41
+ tag-pattern = 'integrations\/edenai-v(?P<version>.*)'
42
+
43
+ [tool.hatch.version.raw-options]
44
+ root = "../.."
45
+ git_describe_command = 'git describe --tags --match="integrations/edenai-v[0-9]*"'
46
+
47
+ [tool.hatch.envs.default]
48
+ installer = "uv"
49
+ dependencies = ["haystack-pydoc-tools", "ruff"]
50
+
51
+ [tool.hatch.envs.default.scripts]
52
+ docs = ["haystack-pydoc pydoc/config_docusaurus.yml"]
53
+ fmt = "ruff check --fix {args}; ruff format {args}"
54
+ fmt-check = "ruff check {args} && ruff format --check {args}"
55
+
56
+ [tool.hatch.envs.test]
57
+ dependencies = [
58
+ "pytest",
59
+ "pytest-asyncio",
60
+ "pytest-cov",
61
+ "pytest-rerunfailures",
62
+ "mypy",
63
+ "pip",
64
+ "pytz"
65
+ ]
66
+
67
+ [tool.hatch.envs.test.scripts]
68
+ unit = 'pytest -m "not integration" {args:tests}'
69
+ integration = 'pytest -m "integration" {args:tests}'
70
+ all = 'pytest {args:tests}'
71
+ unit-cov-retry = 'pytest --cov=haystack_integrations --reruns 3 --reruns-delay 30 -x -m "not integration" {args:tests}'
72
+ integration-cov-append-retry = 'pytest --cov=haystack_integrations --cov-append --reruns 3 --reruns-delay 30 -x -m "integration" {args:tests}'
73
+
74
+ types = """mypy -p haystack_integrations.components.generators.edenai \
75
+ -p haystack_integrations.components.embedders.edenai {args}"""
76
+
77
+ [tool.mypy]
78
+ install_types = true
79
+ non_interactive = true
80
+ check_untyped_defs = true
81
+ disallow_incomplete_defs = true
82
+
83
+
84
+ [tool.ruff]
85
+ line-length = 120
86
+
87
+ [tool.ruff.lint]
88
+ select = [
89
+ "A",
90
+ "ANN",
91
+ "ARG",
92
+ "B",
93
+ "C",
94
+ "D102", # Missing docstring in public method
95
+ "D103", # Missing docstring in public function
96
+ "D205", # 1 blank line required between summary line and description
97
+ "D209", # Closing triple quotes go to new line
98
+ "D213", # summary lines must be positioned on the second physical line of the docstring
99
+ "D417", # Missing argument descriptions in the docstring
100
+ "D419", # Docstring is empty
101
+ "DTZ",
102
+ "E",
103
+ "EM",
104
+ "F",
105
+ "FBT",
106
+ "I",
107
+ "ICN",
108
+ "ISC",
109
+ "N",
110
+ "PLC",
111
+ "PLE",
112
+ "PLR",
113
+ "PLW",
114
+ "Q",
115
+ "RUF",
116
+ "S",
117
+ "T",
118
+ "TID",
119
+ "UP",
120
+ "W",
121
+ "YTT",
122
+ ]
123
+ ignore = [
124
+ "ANN401", # Allow Any - used legitimately for dynamic types and SDK boundaries
125
+ # Allow non-abstract empty methods in abstract base classes
126
+ "B027",
127
+ # Allow boolean positional args/defaults and calls: we mirror OpenAI base-class signatures
128
+ # (e.g. `progress_bar: bool = True`)
129
+ "FBT001",
130
+ "FBT002",
131
+ "FBT003",
132
+ # Ignore checks for possible passwords
133
+ "S105",
134
+ "S106",
135
+ "S107",
136
+ # Ignore complexity
137
+ "C901",
138
+ "PLR0911",
139
+ "PLR0912",
140
+ "PLR0913",
141
+ "PLR0915",
142
+ # Ignore unused params
143
+ "ARG001",
144
+ "ARG002",
145
+ "ARG005",
146
+ # Allow function call argument defaults e.g. `Secret.from_env_var`
147
+ "B008",
148
+ ]
149
+
150
+ [tool.ruff.lint.isort]
151
+ known-first-party = ["haystack_integrations"]
152
+
153
+ [tool.ruff.lint.flake8-tidy-imports]
154
+ ban-relative-imports = "parents"
155
+
156
+ [tool.ruff.lint.per-file-ignores]
157
+ # Tests can use magic values, assertions, and relative imports
158
+ "tests/**/*" = ["PLR2004", "S101", "TID252", "D", "ANN"]
159
+ # Examples can use print statements
160
+ "examples/**/*" = ["T201"]
161
+
162
+ [tool.coverage.run]
163
+ source = ["haystack_integrations"]
164
+ branch = true
165
+ relative_files = true
166
+ parallel = true
167
+
168
+ [tool.coverage.report]
169
+ omit = ["*/tests/*", "*/__init__.py"]
170
+ show_missing = true
171
+ exclude_lines = ["no cov", "if __name__ == .__main__.:", "if TYPE_CHECKING:"]
172
+
173
+ [tool.pytest.ini_options]
174
+ addopts = "--strict-markers"
175
+ markers = [
176
+ "integration: integration tests",
177
+ ]
178
+ log_cli = true
179
+ asyncio_mode = "auto"
@@ -0,0 +1,7 @@
1
+ # SPDX-FileCopyrightText: 2023-present deepset GmbH <info@deepset.ai>
2
+ #
3
+ # SPDX-License-Identifier: Apache-2.0
4
+ from .document_embedder import EdenAIDocumentEmbedder
5
+ from .text_embedder import EdenAITextEmbedder
6
+
7
+ __all__ = ["EdenAIDocumentEmbedder", "EdenAITextEmbedder"]