Skip to content

Commit a20f1e8

Browse files
Merge branch 'main' into codex/docling-serve-async-jobs-3345
2 parents fead24f + 3882691 commit a20f1e8

47 files changed

Lines changed: 6082 additions & 4 deletions

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.github/labeler.yml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -333,6 +333,11 @@ integration:togetherai:
333333
- any-glob-to-any-file: "integrations/togetherai/**/*"
334334
- any-glob-to-any-file: ".github/workflows/togetherai.yml"
335335

336+
integration:transformers:
337+
- changed-files:
338+
- any-glob-to-any-file: "integrations/transformers/**/*"
339+
- any-glob-to-any-file: ".github/workflows/transformers.yml"
340+
336341
integration:unstructured-fileconverter:
337342
- changed-files:
338343
- any-glob-to-any-file: "integrations/unstructured/**/*"

.github/workflows/CI_coverage_comment.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -65,6 +65,7 @@ on:
6565
- "Test / supabase"
6666
- "Test / tavily"
6767
- "Test / togetherai"
68+
- "Test / transformers"
6869
- "Test / unstructured"
6970
- "Test / valkey"
7071
- "Test / vespa"

.github/workflows/transformers.yml

Lines changed: 140 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,140 @@
1+
# This workflow comes from https://github.com/ofek/hatch-mypyc
2+
# https://github.com/ofek/hatch-mypyc/blob/5a198c0ba8660494d02716cfc9d79ce4adfb1442/.github/workflows/test.yml
3+
name: Test / transformers
4+
5+
on:
6+
schedule:
7+
- cron: "0 0 * * *"
8+
pull_request:
9+
paths:
10+
- "integrations/transformers/**"
11+
- "!integrations/transformers/*.md"
12+
- ".github/workflows/transformers.yml"
13+
push:
14+
branches:
15+
- main
16+
paths:
17+
- "integrations/transformers/**"
18+
- "!integrations/transformers/*.md"
19+
- ".github/workflows/transformers.yml"
20+
21+
defaults:
22+
run:
23+
working-directory: integrations/transformers
24+
25+
concurrency:
26+
group: transformers-${{ github.head_ref || github.sha }}
27+
cancel-in-progress: true
28+
29+
env:
30+
PYTHONUNBUFFERED: "1"
31+
FORCE_COLOR: "1"
32+
TEST_MATRIX_OS: '["ubuntu-latest", "windows-latest", "macos-latest"]'
33+
TEST_MATRIX_PYTHON: '["3.10", "3.14"]'
34+
35+
jobs:
36+
compute-test-matrix:
37+
runs-on: ubuntu-slim
38+
defaults:
39+
run:
40+
working-directory: .
41+
outputs:
42+
os: ${{ steps.set.outputs.os }}
43+
python-version: ${{ steps.set.outputs.python-version }}
44+
steps:
45+
- id: set
46+
run: |
47+
echo 'os=${{ github.event_name == 'push' && '["ubuntu-latest"]' || env.TEST_MATRIX_OS }}' >> "$GITHUB_OUTPUT"
48+
echo 'python-version=${{ github.event_name == 'push' && '["3.10"]' || env.TEST_MATRIX_PYTHON }}' >> "$GITHUB_OUTPUT"
49+
50+
run:
51+
name: Python ${{ matrix.python-version }} on ${{ startsWith(matrix.os, 'macos-') && 'macOS' || startsWith(matrix.os, 'windows-') && 'Windows' || 'Linux' }}
52+
needs: compute-test-matrix
53+
permissions:
54+
contents: write
55+
pull-requests: write
56+
runs-on: ${{ matrix.os }}
57+
strategy:
58+
fail-fast: false
59+
matrix:
60+
os: ${{ fromJSON(needs.compute-test-matrix.outputs.os) }}
61+
python-version: ${{ fromJSON(needs.compute-test-matrix.outputs.python-version) }}
62+
63+
steps:
64+
- name: Support longpaths
65+
if: matrix.os == 'windows-latest'
66+
working-directory: .
67+
run: git config --system core.longpaths true
68+
69+
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
70+
71+
- name: Set up Python ${{ matrix.python-version }}
72+
uses: actions/setup-python@a309ff8b426b58ec0e2a45f0f869d46889d02405 # v6.2.0
73+
with:
74+
python-version: ${{ matrix.python-version }}
75+
76+
- name: Install Hatch
77+
run: |
78+
python -m pip install --upgrade pip
79+
pip install hatch --uploaded-prior-to=P1D
80+
- name: Lint
81+
if: matrix.python-version == '3.10' && runner.os == 'Linux'
82+
run: hatch run fmt-check && hatch run test:types
83+
84+
- name: Run unit tests
85+
run: hatch run test:unit-cov-retry
86+
87+
# On PR: posts coverage comment (directly on same-repo PRs; via artifact for fork PRs). On push to main: stores coverage baseline on data branch.
88+
- name: Store unit tests coverage
89+
id: coverage_comment
90+
if: matrix.python-version == '3.10' && runner.os == 'Linux' && github.event_name != 'schedule'
91+
uses: py-cov-action/python-coverage-comment-action@63f52f4fbbffada6e8dee8ec432de7e01df9ba79 # v3.41
92+
with:
93+
GITHUB_TOKEN: ${{ github.token }}
94+
COVERAGE_PATH: integrations/transformers
95+
SUBPROJECT_ID: transformers
96+
MINIMUM_GREEN: 90
97+
MINIMUM_ORANGE: 60
98+
99+
- name: Upload coverage comment to be posted
100+
if: matrix.python-version == '3.10' && runner.os == 'Linux' && github.event_name == 'pull_request' && steps.coverage_comment.outputs.COMMENT_FILE_WRITTEN == 'true'
101+
uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7.0.1
102+
with:
103+
name: coverage-comment-transformers
104+
path: python-coverage-comment-action-transformers.txt
105+
106+
- name: Run integration tests
107+
run: hatch run test:integration-cov-append-retry
108+
109+
- name: Store combined coverage
110+
if: github.event_name == 'push'
111+
uses: py-cov-action/python-coverage-comment-action@63f52f4fbbffada6e8dee8ec432de7e01df9ba79 # v3.41
112+
with:
113+
GITHUB_TOKEN: ${{ github.token }}
114+
COVERAGE_PATH: integrations/transformers
115+
SUBPROJECT_ID: transformers-combined
116+
MINIMUM_GREEN: 90
117+
MINIMUM_ORANGE: 60
118+
119+
- name: Run unit tests with lowest direct dependencies
120+
if: github.event_name != 'push'
121+
run: |
122+
hatch run uv pip compile pyproject.toml --resolution lowest-direct --output-file requirements_lowest_direct.txt
123+
hatch -e test env run -- uv pip install -r requirements_lowest_direct.txt
124+
hatch run test:unit
125+
126+
- name: Nightly - run unit tests with Haystack main branch
127+
if: github.event_name == 'schedule'
128+
run: |
129+
hatch env prune
130+
hatch -e test env run -- uv pip install git+https://github.com/deepset-ai/haystack.git@main
131+
hatch run test:unit
132+
133+
notify-slack-on-failure:
134+
needs: run
135+
if: failure() && github.event_name == 'schedule'
136+
runs-on: ubuntu-slim
137+
steps:
138+
- uses: deepset-ai/notify-slack-action@a65def0c8bf91d6520286ab34280151c76a5a008 # v1.1.0
139+
with:
140+
slack-webhook-url: ${{ secrets.SLACK_WEBHOOK_URL_NOTIFICATIONS }}

README.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -93,6 +93,7 @@ Please check out our [Contribution Guidelines](CONTRIBUTING.md) for all the deta
9393
| [supabase-haystack](integrations/supabase/) | Document Store | [![PyPI - Version](https://img.shields.io/pypi/v/supabase-haystack.svg)](https://pypi.org/project/supabase-haystack) | [![Test / supabase](https://github.com/deepset-ai/haystack-core-integrations/actions/workflows/supabase.yml/badge.svg)](https://github.com/deepset-ai/haystack-core-integrations/actions/workflows/supabase.yml) | [![Coverage badge](https://img.shields.io/endpoint?url=https://raw.githubusercontent.com/deepset-ai/haystack-core-integrations/python-coverage-comment-action-data-supabase/endpoint.json&label=)](https://htmlpreview.github.io/?https://github.com/deepset-ai/haystack-core-integrations/blob/python-coverage-comment-action-data-supabase/htmlcov/index.html) | [![Coverage badge](https://img.shields.io/endpoint?url=https://raw.githubusercontent.com/deepset-ai/haystack-core-integrations/python-coverage-comment-action-data-supabase-combined/endpoint.json&label=)](https://htmlpreview.github.io/?https://github.com/deepset-ai/haystack-core-integrations/blob/python-coverage-comment-action-data-supabase-combined/htmlcov/index.html) |
9494
| [tavily-haystack](integrations/tavily/) | Websearch | [![PyPI - Version](https://img.shields.io/pypi/v/tavily-haystack.svg)](https://pypi.org/project/tavily-haystack) | [![Test / tavily](https://github.com/deepset-ai/haystack-core-integrations/actions/workflows/tavily.yml/badge.svg)](https://github.com/deepset-ai/haystack-core-integrations/actions/workflows/tavily.yml) | [![Coverage badge](https://img.shields.io/endpoint?url=https://raw.githubusercontent.com/deepset-ai/haystack-core-integrations/python-coverage-comment-action-data-tavily/endpoint.json&label=)](https://htmlpreview.github.io/?https://github.com/deepset-ai/haystack-core-integrations/blob/python-coverage-comment-action-data-tavily/htmlcov/index.html) | [![Coverage badge](https://img.shields.io/endpoint?url=https://raw.githubusercontent.com/deepset-ai/haystack-core-integrations/python-coverage-comment-action-data-tavily-combined/endpoint.json&label=)](https://htmlpreview.github.io/?https://github.com/deepset-ai/haystack-core-integrations/blob/python-coverage-comment-action-data-tavily-combined/htmlcov/index.html) |
9595
| [togetherai-haystack](integrations/togetherai/) | Generator | [![PyPI - Version](https://img.shields.io/pypi/v/togetherai-haystack.svg)](https://pypi.org/project/togetherai-haystack) | [![Test / togetherai](https://github.com/deepset-ai/haystack-core-integrations/actions/workflows/togetherai.yml/badge.svg)](https://github.com/deepset-ai/haystack-core-integrations/actions/workflows/togetherai.yml) | [![Coverage badge](https://img.shields.io/endpoint?url=https://raw.githubusercontent.com/deepset-ai/haystack-core-integrations/python-coverage-comment-action-data-togetherai/endpoint.json&label=)](https://htmlpreview.github.io/?https://github.com/deepset-ai/haystack-core-integrations/blob/python-coverage-comment-action-data-togetherai/htmlcov/index.html) | [![Coverage badge](https://img.shields.io/endpoint?url=https://raw.githubusercontent.com/deepset-ai/haystack-core-integrations/python-coverage-comment-action-data-togetherai-combined/endpoint.json&label=)](https://htmlpreview.github.io/?https://github.com/deepset-ai/haystack-core-integrations/blob/python-coverage-comment-action-data-togetherai-combined/htmlcov/index.html) |
96+
| [transformers-haystack](integrations/transformers/) | Classifier, Extractor, Generator, Reader, Router | [![PyPI - Version](https://img.shields.io/pypi/v/transformers-haystack.svg)](https://pypi.org/project/transformers-haystack) | [![Test / transformers](https://github.com/deepset-ai/haystack-core-integrations/actions/workflows/transformers.yml/badge.svg)](https://github.com/deepset-ai/haystack-core-integrations/actions/workflows/transformers.yml) | [![Coverage badge](https://img.shields.io/endpoint?url=https://raw.githubusercontent.com/deepset-ai/haystack-core-integrations/python-coverage-comment-action-data-transformers/endpoint.json&label=)](https://htmlpreview.github.io/?https://github.com/deepset-ai/haystack-core-integrations/blob/python-coverage-comment-action-data-transformers/htmlcov/index.html) | [![Coverage badge](https://img.shields.io/endpoint?url=https://raw.githubusercontent.com/deepset-ai/haystack-core-integrations/python-coverage-comment-action-data-transformers-combined/endpoint.json&label=)](https://htmlpreview.github.io/?https://github.com/deepset-ai/haystack-core-integrations/blob/python-coverage-comment-action-data-transformers-combined/htmlcov/index.html) |
9697
| [unstructured-fileconverter-haystack](integrations/unstructured/) | File converter | [![PyPI - Version](https://img.shields.io/pypi/v/unstructured-fileconverter-haystack.svg)](https://pypi.org/project/unstructured-fileconverter-haystack) | [![Test / unstructured](https://github.com/deepset-ai/haystack-core-integrations/actions/workflows/unstructured.yml/badge.svg)](https://github.com/deepset-ai/haystack-core-integrations/actions/workflows/unstructured.yml) | [![Coverage badge](https://img.shields.io/endpoint?url=https://raw.githubusercontent.com/deepset-ai/haystack-core-integrations/python-coverage-comment-action-data-unstructured/endpoint.json&label=)](https://htmlpreview.github.io/?https://github.com/deepset-ai/haystack-core-integrations/blob/python-coverage-comment-action-data-unstructured/htmlcov/index.html) | [![Coverage badge](https://img.shields.io/endpoint?url=https://raw.githubusercontent.com/deepset-ai/haystack-core-integrations/python-coverage-comment-action-data-unstructured-combined/endpoint.json&label=)](https://htmlpreview.github.io/?https://github.com/deepset-ai/haystack-core-integrations/blob/python-coverage-comment-action-data-unstructured-combined/htmlcov/index.html) |
9798
| [valkey-haystack](integrations/valkey/) | Document Store | [![PyPI - Version](https://img.shields.io/pypi/v/valkey-haystack.svg)](https://pypi.org/project/valkey-haystack) | [![Test / valkey](https://github.com/deepset-ai/haystack-core-integrations/actions/workflows/valkey.yml/badge.svg)](https://github.com/deepset-ai/haystack-core-integrations/actions/workflows/valkey.yml) | [![Coverage badge](https://img.shields.io/endpoint?url=https://raw.githubusercontent.com/deepset-ai/haystack-core-integrations/python-coverage-comment-action-data-valkey/endpoint.json&label=)](https://htmlpreview.github.io/?https://github.com/deepset-ai/haystack-core-integrations/blob/python-coverage-comment-action-data-valkey/htmlcov/index.html) | [![Coverage badge](https://img.shields.io/endpoint?url=https://raw.githubusercontent.com/deepset-ai/haystack-core-integrations/python-coverage-comment-action-data-valkey-combined/endpoint.json&label=)](https://htmlpreview.github.io/?https://github.com/deepset-ai/haystack-core-integrations/blob/python-coverage-comment-action-data-valkey-combined/htmlcov/index.html) |
9899
| [vespa-haystack](integrations/vespa/) | Document Store | [![PyPI - Version](https://img.shields.io/pypi/v/vespa-haystack.svg)](https://pypi.org/project/vespa-haystack) | [![Test / vespa](https://github.com/deepset-ai/haystack-core-integrations/actions/workflows/vespa.yml/badge.svg)](https://github.com/deepset-ai/haystack-core-integrations/actions/workflows/vespa.yml) | [![Coverage badge](https://img.shields.io/endpoint?url=https://raw.githubusercontent.com/deepset-ai/haystack-core-integrations/python-coverage-comment-action-data-vespa/endpoint.json&label=)](https://htmlpreview.github.io/?https://github.com/deepset-ai/haystack-core-integrations/blob/python-coverage-comment-action-data-vespa/htmlcov/index.html) | [![Coverage badge](https://img.shields.io/endpoint?url=https://raw.githubusercontent.com/deepset-ai/haystack-core-integrations/python-coverage-comment-action-data-vespa-combined/endpoint.json&label=)](https://htmlpreview.github.io/?https://github.com/deepset-ai/haystack-core-integrations/blob/python-coverage-comment-action-data-vespa-combined/htmlcov/index.html) |

integrations/google_genai/CHANGELOG.md

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,19 @@
11
# Changelog
22

3+
## [integrations/google_genai-v4.4.1] - 2026-06-08
4+
5+
### 🐛 Bug Fixes
6+
7+
- Async streaming chunk indices in GoogleGenAIChatGenerator start at 0, not 1 (#3410)
8+
9+
10+
## [integrations/google_genai-v4.4.0] - 2026-06-08
11+
12+
### 🚀 Features
13+
14+
- *(google_genai)* Add timeout and max_retries to embedder components (#3412)
15+
16+
317
## [integrations/google_genai-v4.3.0] - 2026-06-05
418

519
### 🚀 Features

integrations/google_genai/src/haystack_integrations/components/embedders/google_genai/document_embedder.py

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -85,6 +85,8 @@ def __init__(
8585
meta_fields_to_embed: list[str] | None = None,
8686
embedding_separator: str = "\n",
8787
config: dict[str, Any] | None = None,
88+
timeout: float | None = None,
89+
max_retries: int | None = None,
8890
) -> None:
8991
"""
9092
Creates an GoogleGenAIDocumentEmbedder component.
@@ -122,6 +124,11 @@ def __init__(
122124
Specifying task types in `config` does not take effect for `gemini-embedding-2`.
123125
See [Gemini documentation](https://ai.google.dev/gemini-api/docs/embeddings#task-types) for more
124126
information.
127+
:param timeout:
128+
The timeout in seconds for the underlying Google GenAI client network requests.
129+
:param max_retries:
130+
The maximum number of retries for the underlying Google GenAI client network requests.
131+
125132
"""
126133
self._api_key = api_key
127134
self._api = api
@@ -135,12 +142,16 @@ def __init__(
135142
self._meta_fields_to_embed = meta_fields_to_embed or []
136143
self._embedding_separator = embedding_separator
137144
self._config = config
145+
self._timeout = timeout
146+
self._max_retries = max_retries
138147

139148
self._client = _get_client(
140149
api_key=api_key,
141150
api=api,
142151
vertex_ai_project=vertex_ai_project,
143152
vertex_ai_location=vertex_ai_location,
153+
timeout=timeout,
154+
max_retries=max_retries,
144155
)
145156

146157
def to_dict(self) -> dict[str, Any]:
@@ -164,6 +175,8 @@ def to_dict(self) -> dict[str, Any]:
164175
vertex_ai_project=self._vertex_ai_project,
165176
vertex_ai_location=self._vertex_ai_location,
166177
config=self._config,
178+
timeout=self._timeout,
179+
max_retries=self._max_retries,
167180
)
168181

169182
@classmethod

0 commit comments

Comments
 (0)