Add UniRate integration - #557
Conversation
Adds the UniRate currency-exchange integration (haystack-unirate) — three Haystack 2.x components for FX rate lookups, currency conversion, and currency listings. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
|
@rob-browncc is attempting to deploy a commit to the deepset Team on Vercel. A member of the Team first needs to authorize it. |
|
Thank you, @rob-browncc Could you please help me understand if the integration comes from an actual need of any user? I would like to know if that's going to be helpful for a broader audience. |
|
Thanks for taking a look, @kacperlukawski — fair question. Honestly, I built this to fill a gap rather than in response to a specific user ticket: Haystack doesn't currently have a component for live currency/exchange-rate data. The use case is pipelines and agents that need up-to-date FX — e.g. a finance/e-commerce RAG assistant answering "what's this price in EUR today?", or an agent tool that converts amounts and pulls VAT rates as part of a larger workflow. It's three small I don't want to overstate demand — I can't point you to a pile of users asking for it specifically. If a standalone FX integration feels too niche for the directory, I'm happy to adjust the framing/scope, or you're equally welcome to pass on it. No hard feelings either way — just thought it might be a useful building block for the finance-adjacent folks in the community. |
There was a problem hiding this comment.
Pull request overview
Adds a new integration page and assets for UniRate so it can appear in the Haystack integrations index.
Changes:
- Added
integrations/unirate.mdwith front-matter metadata, installation steps, and a minimal usage example. - Added
logos/unirate.pngand referenced it from the integration page.
Reviewed changes
Copilot reviewed 1 out of 2 changed files in this pull request and generated 1 comment.
| File | Description |
|---|---|
integrations/unirate.md |
New integration documentation page (metadata + overview + install/usage + license). |
logos/unirate.png |
New logo asset used by the integration page. |
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
| ```python | ||
| from haystack import Pipeline | ||
| from haystack.utils import Secret | ||
| from haystack_unirate import UniRateConverter | ||
|
|
||
| pipeline = Pipeline() | ||
| pipeline.add_component( | ||
| "convert", UniRateConverter(api_key=Secret.from_env_var("UNIRATE_API_KEY")) | ||
| ) | ||
|
|
||
| result = pipeline.run( | ||
| {"convert": {"from_currency": "USD", "to_currency": "EUR", "amount": 100}} | ||
| ) | ||
| print(result["convert"]["result"]) # e.g. 92.5 | ||
| ``` |
There was a problem hiding this comment.
A pipeline usage should present more than just one component. Typically, we highlight how it might be combined with a chat generator.
Adds the UniRate currency-exchange integration to the Haystack integrations index.
haystack-unirateprovides three Haystack 2.x@componentbuilding blocks for working with live currency data in pipelines:UniRateExchangeRate— latest exchange rate for a currency pair (or all targets for a base).UniRateConverter— convert a monetary amount between two currencies.UniRateCurrencies— list every supported currency code.Each component supports
to_dict/from_dictserialization and uses HaystackSecretfor API-key handling. Free-tier endpoints (rates, conversion, currency listings) work out of the box; historical data is Pro-gated.This PR adds
integrations/unirate.md(front-matter + docs) andlogos/unirate.png.