feat: add Eden AI integration (chat generator + embedders)#3615
Conversation
|
Update: Aligned on slack |
@sjrl @bilgeyucel aligned with Eden AI via slack on re-opening their PR. I will set up an API key with their help. |
|
@MVS-source thanks so much for the contribution! It looks like the commits were made with the identity Could you please add the email address used for those commits to the GitHub account that opened the PR, then sign the CLA with that account? Once that’s done, you can use the recheck link above to refresh the status. Thanks again for helping us get this sorted! |
c466777 to
c25ec75
Compare
- drop the haystack-ai upper pin (verified against Haystack 3.0) - use ToolsType from haystack.tools in EdenAIChatGenerator - add to_dict to EdenAIChatGenerator (drops api_base_url/organization so it round-trips) - make embedder init params keyword-only; let the base class hold timeout/max_retries - trim tests to Eden AI-specific behaviour; drop the async test file - remove hand-written CHANGELOG; slim README to match sibling integrations
|
Thanks a lot for the detailed review, @sjrl — really appreciate you taking the time to go through it so thoroughly. 🙏 Just pushed a commit addressing everything:
Happy to follow up with the catalog page in |
|
@MVS-source thanks for responding so quickly! And for addressing all of my comments. It should be almost good to go. One thing I did forget to mention is could you add an entry to its what we use to track code coverage on integrations.I'll also give another look over of the code and would definitely appreciate a follow up PR in haystack-integrations |
- add the @component decorator (like the other integrations) - use the explicit super(EdenAIChatGenerator, self) form since @component recreates the class - re-implement to_dict via default_to_dict with only the init parameters (drops api_base_url and organization), following the cometapi pattern
|
Thanks @sjrl! Pushed a commit addressing the chat generator comments:
On Validated the full suite against Haystack 2.30 and 3.0. Thanks again! |
|
Thanks @MVS-source! For this point
no worries then, that is a lot of models 😅 |
|
@MVS-source one last thing, could you do what's described in this comment? #3615 (comment) |
|
Done, added And yes, I'll follow up with the catalog page PR in |
sjrl
left a comment
There was a problem hiding this comment.
Thanks for the contribution!
Related Issues
Supersedes #3517 (closed). Re-opened via the monorepo route, as discussed with the maintainers.
Proposed Changes:
Adds a new
integrations/edenai/package that integrates Eden AI with Haystack.Eden AI exposes 500+ models from providers such as OpenAI, Anthropic, Google, Mistral and more behind a single, OpenAI-compatible API — EU-hosted and GDPR-aligned, with unified billing.
New components:
EdenAIChatGenerator— chat completions through Eden AI's OpenAI-compatible endpoint (https://api.edenai.run/v3), using theprovider/modelnaming scheme (e.g.anthropic/claude-sonnet-5).EdenAITextEmbedder— embeds a string.EdenAIDocumentEmbedder— embeds a list ofDocuments.The package follows the standard monorepo layout:
pyproject.toml(packageedenai-haystack, tag patternintegrations/edenai-v*), pydoc config,README,CHANGELOG, anexamples/edenai_rag_pipeline.py, the.github/workflows/edenai.ymlCI workflow, a.github/labeler.ymlentry and a row in the rootREADME.How did you test it?
mistral/mistral-small-2603→ HTTP 200.openai/text-embedding-3-small→ HTTP 200, 1536-dim vectors.edenai.ymlworkflow runs the suite. The live tests readEDENAI_API_KEY.Notes for the reviewer
EDENAI_API_KEYrepo secret. I have a scoped key ready — happy to share it through whatever secure channel you prefer. (Note: GitHub does not expose repo secrets to workflows triggered from a fork, so the live-test job won't have the key on this PR; it can run post-merge or via your usual maintainer trigger.)edenai-haystack, tag patternintegrations/edenai-v*, aligned with the other integrations.Checklist
fix:,feat:,build:,chore:,ci:,docs:,style:,refactor:,perf:,test:.