Skip to content

feat: Adding watsonx support in Haystack #9478

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
wants to merge 4 commits into from

Conversation

divyaruhil
Copy link

@divyaruhil divyaruhil commented Jun 3, 2025

Related Issues

#link

Proposed Changes:

Add WatsonxGenerator and WatsonxChatGenerator components to wrap IBM watsonx.ai’s text- and chat-generation APIs (supporting streaming, custom models, and generation parameters).

Add WatsonxTextEmbedder and WatsonxDocumentEmbedder components that support embedding use cases for both text and documents.

Ensure all components follow the existing Haystack interfaces and patterns for Generator and Embedder.

Include tests files accordingly.

How did you test it?

  • Created unit and integration test files for the new WatsonxGenerator, WatsonxTextEmbedder, and WatsonxDocumentEmbedder components.
  • Verified functionality by running the test suite to ensure all components behave as expected.
  • Manually tested by importing the components into a Jupyter Notebook and running example queries to confirm that:
    --Text generation works with WatsonxGenerator
    --Chat generation works with WatsonxChatGenerator
    -- Embeddings are correctly generated for both text and documents using the respective embedder components

Checklist

  • I have read the contributors guidelines and the code of conduct
  • I have updated the related issue with new insights and changes
  • I added unit tests and updated the docstrings
  • I've used one of the conventional commit types for my PR title: fix:, feat:, build:, chore:, ci:, docs:, style:, refactor:, perf:, test: and added ! in case the PR includes breaking changes.
  • I documented my code
  • I ran pre-commit hooks and fixed any issue

@divyaruhil divyaruhil requested a review from a team as a code owner June 3, 2025 08:44
@divyaruhil divyaruhil requested review from vblagoje and removed request for a team June 3, 2025 08:44
@CLAassistant
Copy link

CLAassistant commented Jun 3, 2025

CLA assistant check
All committers have signed the CLA.

@sjrl
Copy link
Contributor

sjrl commented Jun 3, 2025

Hey @divyaruhil we appreciate your work on this, but take a look at my comment here deepset-ai/haystack-core-integrations#1891 (comment)

@divyaruhil
Copy link
Author

Sure @sjrl , I'll go through the comment , Thankyou !

@divyaruhil
Copy link
Author

Closing this one as i have opened a pr :- deepset-ai/haystack-core-integrations#1949

@divyaruhil divyaruhil closed this Jun 15, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants