mirror of
https://github.com/langflow-ai/langflow.git
synced 2026-07-24 05:16:40 +08:00
148 lines
61 KiB
HTML
148 lines
61 KiB
HTML
<!doctype html>
|
||
<html lang="en" dir="ltr" class="docs-wrapper plugin-docs plugin-id-default docs-version-current docs-doc-page docs-doc-id-Components/components-embedding-models" data-has-hydrated="false">
|
||
<head>
|
||
<meta charset="UTF-8">
|
||
<meta name="generator" content="Docusaurus v3.7.0">
|
||
<title data-rh="true">Embeddings | Langflow Documentation</title><meta data-rh="true" name="viewport" content="width=device-width,initial-scale=1"><meta data-rh="true" name="twitter:card" content="summary_large_image"><meta data-rh="true" property="og:url" content="https://docs.langflow.org/components-embedding-models"><meta data-rh="true" property="og:locale" content="en"><meta data-rh="true" name="docusaurus_locale" content="en"><meta data-rh="true" name="docsearch:language" content="en"><meta data-rh="true" name="docusaurus_version" content="current"><meta data-rh="true" name="docusaurus_tag" content="docs-default-current"><meta data-rh="true" name="docsearch:version" content="current"><meta data-rh="true" name="docsearch:docusaurus_tag" content="docs-default-current"><meta data-rh="true" property="og:title" content="Embeddings | Langflow Documentation"><meta data-rh="true" name="description" content="Embeddings models convert text into numerical vectors. These embeddings capture the semantic meaning of the input text, and allow LLMs to understand context."><meta data-rh="true" property="og:description" content="Embeddings models convert text into numerical vectors. These embeddings capture the semantic meaning of the input text, and allow LLMs to understand context."><link data-rh="true" rel="icon" href="/img/favicon.ico"><link data-rh="true" rel="canonical" href="https://docs.langflow.org/components-embedding-models"><link data-rh="true" rel="alternate" href="https://docs.langflow.org/components-embedding-models" hreflang="en"><link data-rh="true" rel="alternate" href="https://docs.langflow.org/components-embedding-models" hreflang="x-default"><link data-rh="true" rel="preconnect" href="https://UZK6BDPCVY-dsn.algolia.net" crossorigin="anonymous"><link rel="preconnect" href="https://www.google-analytics.com">
|
||
<link rel="preconnect" href="https://www.googletagmanager.com">
|
||
<script async src="https://www.googletagmanager.com/gtag/js?id=G-SLQFLQ3KPT"></script>
|
||
<script>function gtag(){dataLayer.push(arguments)}window.dataLayer=window.dataLayer||[],gtag("js",new Date),gtag("config","G-SLQFLQ3KPT",{})</script>
|
||
|
||
|
||
|
||
|
||
|
||
<link rel="search" type="application/opensearchdescription+xml" title="Langflow Documentation" href="/opensearch.xml">
|
||
|
||
|
||
|
||
|
||
|
||
<link rel="stylesheet" href="https://fonts.googleapis.com/css2?family=Sora:wght@550;600&display=swap">
|
||
<script>!function(){window.semaphore=window.semaphore||[],window.ketch=function(){window.semaphore.push(arguments)};var e=document.createElement("script");e.type="text/javascript",e.src="https://global.ketchcdn.com/web/v3/config/datastax/langflow_org_web/boot.js",e.defer=e.async=!0,document.getElementsByTagName("head")[0].appendChild(e)}()</script>
|
||
<script defer="true">!function(){const e=e=>{if(window.gtag&&e.purposes&&"analytics"in e.purposes&&"targeted_advertising"in e.purposes){const n=!0===e.purposes.analytics?"granted":"denied",t=!0===e.purposes.targeted_advertising?"granted":"denied",a={analytics_storage:n,ad_personalization:t,ad_storage:t,ad_user_data:t};window.gtag("consent","update",a)}};window.ketch&&window.ketch("on","consent",e)}()</script><link rel="stylesheet" href="/assets/css/styles.556d0cc8.css">
|
||
<script src="/assets/js/runtime~main.36d0d05a.js" defer="defer"></script>
|
||
<script src="/assets/js/main.01cab6af.js" defer="defer"></script>
|
||
</head>
|
||
<body class="navigation-with-keyboard">
|
||
<script>!function(){function t(t){document.documentElement.setAttribute("data-theme",t)}var e=function(){try{return new URLSearchParams(window.location.search).get("docusaurus-theme")}catch(t){}}()||function(){try{return window.localStorage.getItem("theme")}catch(t){}}();null!==e?t(e):window.matchMedia("(prefers-color-scheme: dark)").matches?t("dark"):(window.matchMedia("(prefers-color-scheme: light)").matches,t("light"))}(),function(){try{const c=new URLSearchParams(window.location.search).entries();for(var[t,e]of c)if(t.startsWith("docusaurus-data-")){var a=t.replace("docusaurus-data-","data-");document.documentElement.setAttribute(a,e)}}catch(t){}}()</script><div id="__docusaurus"><div role="region" aria-label="Skip to main content"><a class="skipToContent_fXgn" href="#__docusaurus_skipToContent_fallback">Skip to main content</a></div><nav aria-label="Main" class="navbar navbar--fixed-top navbarHideable_m1mJ"><div class="navbar__inner"><div class="navbar__items"><button aria-label="Toggle navigation bar" aria-expanded="false" class="navbar__toggle clean-btn" type="button"><svg width="30" height="30" viewBox="0 0 30 30" aria-hidden="true"><path stroke="currentColor" stroke-linecap="round" stroke-miterlimit="10" stroke-width="2" d="M4 7h22M4 15h22M4 23h22"></path></svg></button><a class="navbar__brand" href="/"><div class="navbar__logo"><img src="/img/lf-docs-light.svg" alt="Langflow" class="themedComponent_mlkZ themedComponent--light_NVdE"><img src="/img/lf-docs-dark.svg" alt="Langflow" class="themedComponent_mlkZ themedComponent--dark_xIcU"></div></a></div><div class="navbar__items navbar__items--right"><a href="https://github.com/langflow-ai/langflow" target="_blank" class="navbar__item navbar__link header-github-link"></a><a href="https://twitter.com/langflow_ai" target="_blank" class="navbar__item navbar__link header-twitter-link"></a><a href="https://discord.gg/EqksyE2EX9" target="_blank" class="navbar__item navbar__link header-discord-link"></a><div class="toggle_vylO colorModeToggle_DEke"><button class="clean-btn toggleButton_gllP toggleButtonDisabled_aARS" type="button" disabled="" title="Switch between dark and light mode (currently light mode)" aria-label="Switch between dark and light mode (currently light mode)" aria-live="polite" aria-pressed="false"><svg viewBox="0 0 24 24" width="24" height="24" class="lightToggleIcon_pyhR"><path fill="currentColor" d="M12,9c1.65,0,3,1.35,3,3s-1.35,3-3,3s-3-1.35-3-3S10.35,9,12,9 M12,7c-2.76,0-5,2.24-5,5s2.24,5,5,5s5-2.24,5-5 S14.76,7,12,7L12,7z M2,13l2,0c0.55,0,1-0.45,1-1s-0.45-1-1-1l-2,0c-0.55,0-1,0.45-1,1S1.45,13,2,13z M20,13l2,0c0.55,0,1-0.45,1-1 s-0.45-1-1-1l-2,0c-0.55,0-1,0.45-1,1S19.45,13,20,13z M11,2v2c0,0.55,0.45,1,1,1s1-0.45,1-1V2c0-0.55-0.45-1-1-1S11,1.45,11,2z M11,20v2c0,0.55,0.45,1,1,1s1-0.45,1-1v-2c0-0.55-0.45-1-1-1C11.45,19,11,19.45,11,20z M5.99,4.58c-0.39-0.39-1.03-0.39-1.41,0 c-0.39,0.39-0.39,1.03,0,1.41l1.06,1.06c0.39,0.39,1.03,0.39,1.41,0s0.39-1.03,0-1.41L5.99,4.58z M18.36,16.95 c-0.39-0.39-1.03-0.39-1.41,0c-0.39,0.39-0.39,1.03,0,1.41l1.06,1.06c0.39,0.39,1.03,0.39,1.41,0c0.39-0.39,0.39-1.03,0-1.41 L18.36,16.95z M19.42,5.99c0.39-0.39,0.39-1.03,0-1.41c-0.39-0.39-1.03-0.39-1.41,0l-1.06,1.06c-0.39,0.39-0.39,1.03,0,1.41 s1.03,0.39,1.41,0L19.42,5.99z M7.05,18.36c0.39-0.39,0.39-1.03,0-1.41c-0.39-0.39-1.03-0.39-1.41,0l-1.06,1.06 c-0.39,0.39-0.39,1.03,0,1.41s1.03,0.39,1.41,0L7.05,18.36z"></path></svg><svg viewBox="0 0 24 24" width="24" height="24" class="darkToggleIcon_wfgR"><path fill="currentColor" d="M9.37,5.51C9.19,6.15,9.1,6.82,9.1,7.5c0,4.08,3.32,7.4,7.4,7.4c0.68,0,1.35-0.09,1.99-0.27C17.45,17.19,14.93,19,12,19 c-3.86,0-7-3.14-7-7C5,9.07,6.81,6.55,9.37,5.51z M12,3c-4.97,0-9,4.03-9,9s4.03,9,9,9s9-4.03,9-9c0-0.46-0.04-0.92-0.1-1.36 c-0.98,1.37-2.58,2.26-4.4,2.26c-2.98,0-5.4-2.42-5.4-5.4c0-1.81,0.89-3.42,2.26-4.4C12.92,3.04,12.46,3,12,3L12,3z"></path></svg></button></div><div class="navbarSearchContainer_Bca1"><button type="button" class="DocSearch DocSearch-Button" aria-label="Search (Command+K)"><span class="DocSearch-Button-Container"><svg width="20" height="20" class="DocSearch-Search-Icon" viewBox="0 0 20 20" aria-hidden="true"><path d="M14.386 14.386l4.0877 4.0877-4.0877-4.0877c-2.9418 2.9419-7.7115 2.9419-10.6533 0-2.9419-2.9418-2.9419-7.7115 0-10.6533 2.9418-2.9419 7.7115-2.9419 10.6533 0 2.9419 2.9418 2.9419 7.7115 0 10.6533z" stroke="currentColor" fill="none" fill-rule="evenodd" stroke-linecap="round" stroke-linejoin="round"></path></svg><span class="DocSearch-Button-Placeholder">Search</span></span><span class="DocSearch-Button-Keys"></span></button></div></div></div><div role="presentation" class="navbar-sidebar__backdrop"></div></nav><div id="__docusaurus_skipToContent_fallback" class="main-wrapper mainWrapper_z2l0"><div class="docsWrapper_hBAB"><button aria-label="Scroll back to top" class="clean-btn theme-back-to-top-button backToTopButton_sjWU" type="button"></button><div class="docRoot_UBD9"><aside class="theme-doc-sidebar-container docSidebarContainer_YfHR"><div class="sidebarViewport_aRkj"><div class="sidebar_njMd sidebarWithHideableNavbar_wUlq"><a tabindex="-1" class="sidebarLogo_isFc" href="/"><img src="/img/lf-docs-light.svg" alt="Langflow" class="themedComponent_mlkZ themedComponent--light_NVdE"><img src="/img/lf-docs-dark.svg" alt="Langflow" class="themedComponent_mlkZ themedComponent--dark_xIcU"></a><nav aria-label="Docs sidebar" class="menu thin-scrollbar menu_SIkG"><ul class="theme-doc-sidebar-menu menu__list"><li class="theme-doc-sidebar-item-link theme-doc-sidebar-item-link-level-1 menu__list-item"><a class="menu__link" href="/">Welcome to Langflow</a></li><li class="theme-doc-sidebar-item-category theme-doc-sidebar-item-category-level-1 menu__list-item menu__list-item--collapsed"><div class="menu__list-item-collapsible"><a class="menu__link menu__link--sublist menu__link--sublist-caret" role="button" aria-expanded="false" href="/get-started-installation">Get started</a></div></li><li class="theme-doc-sidebar-item-category theme-doc-sidebar-item-category-level-1 menu__list-item menu__list-item--collapsed"><div class="menu__list-item-collapsible"><a class="menu__link menu__link--sublist menu__link--sublist-caret" role="button" aria-expanded="false" href="/basic-prompting">Templates</a></div></li><li class="theme-doc-sidebar-item-category theme-doc-sidebar-item-category-level-1 menu__list-item menu__list-item--collapsed"><div class="menu__list-item-collapsible"><a class="menu__link menu__link--sublist menu__link--sublist-caret" role="button" aria-expanded="false" href="/concepts-overview">Concepts</a></div></li><li class="theme-doc-sidebar-item-category theme-doc-sidebar-item-category-level-1 menu__list-item"><div class="menu__list-item-collapsible"><a class="menu__link menu__link--sublist menu__link--sublist-caret menu__link--active" role="button" aria-expanded="true" href="/components-agents">Components</a></div><ul style="display:block;overflow:visible;height:auto" class="menu__list"><li class="theme-doc-sidebar-item-link theme-doc-sidebar-item-link-level-2 menu__list-item"><a class="menu__link" tabindex="0" href="/components-agents">Agents</a></li><li class="theme-doc-sidebar-item-link theme-doc-sidebar-item-link-level-2 menu__list-item"><a class="menu__link" tabindex="0" href="/components-bundle-components">Bundles</a></li><li class="theme-doc-sidebar-item-link theme-doc-sidebar-item-link-level-2 menu__list-item"><a class="menu__link" tabindex="0" href="/components-custom-components">Create custom Python components</a></li><li class="theme-doc-sidebar-item-link theme-doc-sidebar-item-link-level-2 menu__list-item"><a class="menu__link" tabindex="0" href="/components-data">Data</a></li><li class="theme-doc-sidebar-item-link theme-doc-sidebar-item-link-level-2 menu__list-item"><a class="menu__link menu__link--active" aria-current="page" tabindex="0" href="/components-embedding-models">Embeddings</a></li><li class="theme-doc-sidebar-item-link theme-doc-sidebar-item-link-level-2 menu__list-item"><a class="menu__link" tabindex="0" href="/components-helpers">Helpers</a></li><li class="theme-doc-sidebar-item-link theme-doc-sidebar-item-link-level-2 menu__list-item"><a class="menu__link" tabindex="0" href="/components-io">Inputs and outputs</a></li><li class="theme-doc-sidebar-item-link theme-doc-sidebar-item-link-level-2 menu__list-item"><a class="menu__link" tabindex="0" href="/components-logic">Logic</a></li><li class="theme-doc-sidebar-item-link theme-doc-sidebar-item-link-level-2 menu__list-item"><a class="menu__link" tabindex="0" href="/components-memories">Memories</a></li><li class="theme-doc-sidebar-item-link theme-doc-sidebar-item-link-level-2 menu__list-item"><a class="menu__link" tabindex="0" href="/components-models">Models</a></li><li class="theme-doc-sidebar-item-link theme-doc-sidebar-item-link-level-2 menu__list-item"><a class="menu__link" tabindex="0" href="/components-processing">Processing</a></li><li class="theme-doc-sidebar-item-link theme-doc-sidebar-item-link-level-2 menu__list-item"><a class="menu__link" tabindex="0" href="/components-prompts">Prompts</a></li><li class="theme-doc-sidebar-item-link theme-doc-sidebar-item-link-level-2 menu__list-item"><a class="menu__link" tabindex="0" href="/components-tools">Tools</a></li><li class="theme-doc-sidebar-item-link theme-doc-sidebar-item-link-level-2 menu__list-item"><a class="menu__link" tabindex="0" href="/components-vector-stores">Vector stores</a></li></ul></li><li class="theme-doc-sidebar-item-category theme-doc-sidebar-item-category-level-1 menu__list-item menu__list-item--collapsed"><div class="menu__list-item-collapsible"><a class="menu__link menu__link--sublist menu__link--sublist-caret" role="button" aria-expanded="false" href="/agents-overview">Agents</a></div></li><li class="theme-doc-sidebar-item-category theme-doc-sidebar-item-category-level-1 menu__list-item menu__list-item--collapsed"><div class="menu__list-item-collapsible"><a class="menu__link menu__link--sublist menu__link--sublist-caret" role="button" aria-expanded="false" href="/mcp-server">Model Context Protocol (MCP)</a></div></li><li class="theme-doc-sidebar-item-category theme-doc-sidebar-item-category-level-1 menu__list-item menu__list-item--collapsed"><div class="menu__list-item-collapsible"><a class="menu__link menu__link--sublist menu__link--sublist-caret" role="button" aria-expanded="false" href="/configuration-api-keys">Configuration</a></div></li><li class="theme-doc-sidebar-item-category theme-doc-sidebar-item-category-level-1 menu__list-item menu__list-item--collapsed"><div class="menu__list-item-collapsible"><a class="menu__link menu__link--sublist menu__link--sublist-caret" role="button" aria-expanded="false" href="/develop-overview">Develop</a></div></li><li class="theme-doc-sidebar-item-category theme-doc-sidebar-item-category-level-1 menu__list-item menu__list-item--collapsed"><div class="menu__list-item-collapsible"><a class="menu__link menu__link--sublist menu__link--sublist-caret" role="button" aria-expanded="false" href="/deployment-overview">Deployment</a></div></li><li class="theme-doc-sidebar-item-category theme-doc-sidebar-item-category-level-1 menu__list-item menu__list-item--collapsed"><div class="menu__list-item-collapsible"><a class="menu__link menu__link--sublist menu__link--sublist-caret" role="button" aria-expanded="false" href="/api">API reference</a></div></li><li class="theme-doc-sidebar-item-category theme-doc-sidebar-item-category-level-1 menu__list-item menu__list-item--collapsed"><div class="menu__list-item-collapsible"><a class="menu__link menu__link--sublist menu__link--sublist-caret" role="button" aria-expanded="false" href="/integrations-apify">Integrations</a></div></li><li class="theme-doc-sidebar-item-category theme-doc-sidebar-item-category-level-1 menu__list-item menu__list-item--collapsed"><div class="menu__list-item-collapsible"><a class="menu__link menu__link--sublist menu__link--sublist-caret" role="button" aria-expanded="false" href="/contributing-community">Contributing</a></div></li><li class="theme-doc-sidebar-item-category theme-doc-sidebar-item-category-level-1 menu__list-item menu__list-item--collapsed"><div class="menu__list-item-collapsible"><a href="https://github.com/langflow-ai/langflow/releases/latest" target="_blank" rel="noopener noreferrer" class="menu__link menu__link--sublist menu__link--sublist-caret" role="button" aria-expanded="false">Changelog</a></div></li><li class="theme-doc-sidebar-item-category theme-doc-sidebar-item-category-level-1 menu__list-item menu__list-item--collapsed"><div class="menu__list-item-collapsible"><a class="menu__link menu__link--sublist menu__link--sublist-caret" role="button" aria-expanded="false" href="/luna-for-langflow">Support</a></div></li><li class="theme-doc-sidebar-item-link theme-doc-sidebar-item-link-level-1 sidebar-ad">
|
||
<a href="https://astra.datastax.com/signup?type=langflow" target="_blank" class="menu__link">
|
||
<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-cloud"><path d="M17.5 19H9a7 7 0 1 1 6.71-9h1.79a4.5 4.5 0 1 1 0 9Z"/></svg>
|
||
<div class="sidebar-ad-text-container">
|
||
<span class="sidebar-ad-text">Use Langflow in the cloud</span>
|
||
<span class="sidebar-ad-text sidebar-ad-text-gradient">Sign up for DataStax Langflow</span>
|
||
</div>
|
||
</a>
|
||
</li></ul></nav></div></div></aside><main class="docMainContainer_TBSr"><div class="container padding-top--md padding-bottom--lg"><div class="row"><div class="col docItemCol_VOVn"><div class="docItemContainer_Djhp"><article><nav class="theme-doc-breadcrumbs breadcrumbsContainer_Z_bl" aria-label="Breadcrumbs"><ul class="breadcrumbs" itemscope="" itemtype="https://schema.org/BreadcrumbList"><li class="breadcrumbs__item"><a aria-label="Home page" class="breadcrumbs__link" href="/"><svg viewBox="0 0 24 24" class="breadcrumbHomeIcon_YNFT"><path d="M10 19v-5h4v5c0 .55.45 1 1 1h3c.55 0 1-.45 1-1v-7h1.7c.46 0 .68-.57.33-.87L12.67 3.6c-.38-.34-.96-.34-1.34 0l-8.36 7.53c-.34.3-.13.87.33.87H5v7c0 .55.45 1 1 1h3c.55 0 1-.45 1-1z" fill="currentColor"></path></svg></a></li><li class="breadcrumbs__item"><span class="breadcrumbs__link">Components</span><meta itemprop="position" content="1"></li><li itemscope="" itemprop="itemListElement" itemtype="https://schema.org/ListItem" class="breadcrumbs__item breadcrumbs__item--active"><span class="breadcrumbs__link" itemprop="name">Embeddings</span><meta itemprop="position" content="2"></li></ul></nav><div class="tocCollapsible_ETCw theme-doc-toc-mobile tocMobile_ITEo"><button type="button" class="clean-btn tocCollapsibleButton_TO0P">On this page</button></div><div class="theme-doc-markdown markdown"><header><h1>Embeddings models in Langflow</h1></header>
|
||
<p>Embeddings models convert text into numerical vectors. These embeddings capture the semantic meaning of the input text, and allow LLMs to understand context.</p>
|
||
<p>Refer to your specific component's documentation for more information on parameters.</p>
|
||
<h2 class="anchor anchorWithHideOnScrollNavbar_WYt5" id="use-an-embeddings-model-component-in-a-flow">Use an embeddings model component in a flow<a href="#use-an-embeddings-model-component-in-a-flow" class="hash-link" aria-label="Direct link to Use an embeddings model component in a flow" title="Direct link to Use an embeddings model component in a flow"></a></h2>
|
||
<p>In this example of a document ingestion pipeline, the <strong>OpenAI</strong> embeddings model is connected to a vector database. The component converts the text chunks into vectors and stores them in the vector database. The vectorized data can be used to inform AI workloads like chatbots, similarity searches, and agents.</p>
|
||
<p>This embeddings component uses an OpenAI API key for authentication. Refer to your specific embeddings component's documentation for more information on authentication.</p>
|
||
<p><img decoding="async" loading="lazy" alt="URL component in a data ingestion pipeline" src="/assets/images/url-component-fb712df73581345c0f344013ce6ff2fd.png" width="2306" height="1632" class="img_ev3q"></p>
|
||
<h2 class="anchor anchorWithHideOnScrollNavbar_WYt5" id="aiml">AI/ML<a href="#aiml" class="hash-link" aria-label="Direct link to AI/ML" title="Direct link to AI/ML"></a></h2>
|
||
<p>This component generates embeddings using the <a href="https://docs.aimlapi.com/api-overview/embeddings" target="_blank" rel="noopener noreferrer">AI/ML API</a>.</p>
|
||
<details class="details_lb9f alert alert--info details_b_Ee" data-collapsed="true"><summary>Parameters</summary><div><div class="collapsibleContent_i85q"><p><strong>Inputs</strong></p><table><thead><tr><th>Name</th><th>Type</th><th>Description</th></tr></thead><tbody><tr><td>model_name</td><td>String</td><td>The name of the AI/ML embedding model to use.</td></tr><tr><td>aiml_api_key</td><td>SecretString</td><td>The API key required for authenticating with the AI/ML service.</td></tr></tbody></table><p><strong>Outputs</strong></p><table><thead><tr><th>Name</th><th>Type</th><th>Description</th></tr></thead><tbody><tr><td>embeddings</td><td>Embeddings</td><td>An instance of <code>AIMLEmbeddingsImpl</code> for generating embeddings.</td></tr></tbody></table></div></div></details>
|
||
<h2 class="anchor anchorWithHideOnScrollNavbar_WYt5" id="amazon-bedrock-embeddings">Amazon Bedrock Embeddings<a href="#amazon-bedrock-embeddings" class="hash-link" aria-label="Direct link to Amazon Bedrock Embeddings" title="Direct link to Amazon Bedrock Embeddings"></a></h2>
|
||
<p>This component is used to load embedding models from <a href="https://aws.amazon.com/bedrock/" target="_blank" rel="noopener noreferrer">Amazon Bedrock</a>.</p>
|
||
<details class="details_lb9f alert alert--info details_b_Ee" data-collapsed="true"><summary>Parameters</summary><div><div class="collapsibleContent_i85q"><p><strong>Inputs</strong></p><table><thead><tr><th>Name</th><th>Type</th><th>Description</th></tr></thead><tbody><tr><td>credentials_profile_name</td><td>String</td><td>The name of the AWS credentials profile in <code>~/.aws/credentials</code> or <code>~/.aws/config</code>, which has access keys or role information.</td></tr><tr><td>model_id</td><td>String</td><td>The ID of the model to call, such as <code>amazon.titan-embed-text-v1</code>. This is equivalent to the <code>modelId</code> property in the <code>list-foundation-models</code> API.</td></tr><tr><td>endpoint_url</td><td>String</td><td>The URL to set a specific service endpoint other than the default AWS endpoint.</td></tr><tr><td>region_name</td><td>String</td><td>The AWS region to use, such as <code>us-west-2</code>. Falls back to the <code>AWS_DEFAULT_REGION</code> environment variable or region specified in <code>~/.aws/config</code> if not provided.</td></tr></tbody></table><p><strong>Outputs</strong></p><table><thead><tr><th>Name</th><th>Type</th><th>Description</th></tr></thead><tbody><tr><td>embeddings</td><td>Embeddings</td><td>An instance for generating embeddings using Amazon Bedrock.</td></tr></tbody></table></div></div></details>
|
||
<h2 class="anchor anchorWithHideOnScrollNavbar_WYt5" id="astra-db-vectorize">Astra DB vectorize<a href="#astra-db-vectorize" class="hash-link" aria-label="Direct link to Astra DB vectorize" title="Direct link to Astra DB vectorize"></a></h2>
|
||
<div class="theme-admonition theme-admonition-important admonition_xJq3 alert alert--info"><div class="admonitionHeading_Gvgb"><span class="admonitionIcon_Rf37"><svg viewBox="0 0 14 16"><path fill-rule="evenodd" d="M7 2.3c3.14 0 5.7 2.56 5.7 5.7s-2.56 5.7-5.7 5.7A5.71 5.71 0 0 1 1.3 8c0-3.14 2.56-5.7 5.7-5.7zM7 1C3.14 1 0 4.14 0 8s3.14 7 7 7 7-3.14 7-7-3.14-7-7-7zm1 3H6v5h2V4zm0 6H6v2h2v-2z"></path></svg></span>important</div><div class="admonitionContent_BuS1"><p>This component is deprecated as of Langflow version 1.1.2.
|
||
Instead, use the <a href="/components-vector-stores#astra-db-vector-store">Astra DB vector store component</a>.</p></div></div>
|
||
<p>Connect this component to the <strong>Embeddings</strong> port of the <a href="/components-vector-stores#astra-db-vector-store">Astra DB vector store component</a> to generate embeddings.</p>
|
||
<p>This component requires that your Astra DB database has a collection that uses a vectorize embedding provider integration.
|
||
For more information and instructions, see <a href="https://docs.datastax.com/en/astra-db-serverless/databases/embedding-generation.html" target="_blank" rel="noopener noreferrer">Embedding Generation</a>.</p>
|
||
<details class="details_lb9f alert alert--info details_b_Ee" data-collapsed="true"><summary>Parameters</summary><div><div class="collapsibleContent_i85q"><p><strong>Inputs</strong></p><table><thead><tr><th>Name</th><th>Display Name</th><th>Info</th></tr></thead><tbody><tr><td>provider</td><td>Embedding Provider</td><td>The embedding provider to use.</td></tr><tr><td>model_name</td><td>Model Name</td><td>The embedding model to use.</td></tr><tr><td>authentication</td><td>Authentication</td><td>The name of the API key in Astra that stores your <a href="https://docs.datastax.com/en/astra-db-serverless/databases/embedding-generation.html#embedding-provider-authentication" target="_blank" rel="noopener noreferrer">vectorize embedding provider credentials</a>. (Not required if using an <a href="https://docs.datastax.com/en/astra-db-serverless/databases/embedding-generation.html#supported-embedding-providers" target="_blank" rel="noopener noreferrer">Astra-hosted embedding provider</a>.)</td></tr><tr><td>provider_api_key</td><td>Provider API Key</td><td>As an alternative to <code>authentication</code>, directly provide your embedding provider credentials.</td></tr><tr><td>model_parameters</td><td>Model Parameters</td><td>Additional model parameters.</td></tr></tbody></table><p><strong>Outputs</strong></p><table><thead><tr><th>Name</th><th>Type</th><th>Description</th></tr></thead><tbody><tr><td>embeddings</td><td>Embeddings</td><td>An instance for generating embeddings using Astra vectorize.</td></tr></tbody></table></div></div></details>
|
||
<h2 class="anchor anchorWithHideOnScrollNavbar_WYt5" id="azure-openai-embeddings">Azure OpenAI Embeddings<a href="#azure-openai-embeddings" class="hash-link" aria-label="Direct link to Azure OpenAI Embeddings" title="Direct link to Azure OpenAI Embeddings"></a></h2>
|
||
<p>This component generates embeddings using Azure OpenAI models.</p>
|
||
<details class="details_lb9f alert alert--info details_b_Ee" data-collapsed="true"><summary>Parameters</summary><div><div class="collapsibleContent_i85q"><p><strong>Inputs</strong></p><table><thead><tr><th>Name</th><th>Type</th><th>Description</th></tr></thead><tbody><tr><td>Model</td><td>String</td><td>The name of the model to use. Default: <code>text-embedding-3-small</code>.</td></tr><tr><td>Azure Endpoint</td><td>String</td><td>Your Azure endpoint, including the resource, such as <code>https://example-resource.azure.openai.com/</code>.</td></tr><tr><td>Deployment Name</td><td>String</td><td>The name of the deployment.</td></tr><tr><td>API Version</td><td>String</td><td>The API version to use, with options including various dates.</td></tr><tr><td>API Key</td><td>String</td><td>The API key required to access the Azure OpenAI service.</td></tr></tbody></table><p><strong>Outputs</strong></p><table><thead><tr><th>Name</th><th>Type</th><th>Description</th></tr></thead><tbody><tr><td>embeddings</td><td>Embeddings</td><td>An instance for generating embeddings using Azure OpenAI.</td></tr></tbody></table></div></div></details>
|
||
<h2 class="anchor anchorWithHideOnScrollNavbar_WYt5" id="cloudflare-workers-ai-embeddings">Cloudflare Workers AI Embeddings<a href="#cloudflare-workers-ai-embeddings" class="hash-link" aria-label="Direct link to Cloudflare Workers AI Embeddings" title="Direct link to Cloudflare Workers AI Embeddings"></a></h2>
|
||
<p>This component generates embeddings using <a href="https://developers.cloudflare.com/workers-ai/" target="_blank" rel="noopener noreferrer">Cloudflare Workers AI models</a>.</p>
|
||
<details class="details_lb9f alert alert--info details_b_Ee" data-collapsed="true"><summary>Parameters</summary><div><div class="collapsibleContent_i85q"><p><strong>Inputs</strong></p><table><thead><tr><th>Name</th><th>Display Name</th><th>Info</th></tr></thead><tbody><tr><td>account_id</td><td>Cloudflare account ID</td><td><a href="https://developers.cloudflare.com/fundamentals/setup/find-account-and-zone-ids/#find-account-id-workers-and-pages" target="_blank" rel="noopener noreferrer">Find your Cloudflare account ID</a>.</td></tr><tr><td>api_token</td><td>Cloudflare API token</td><td><a href="https://developers.cloudflare.com/fundamentals/api/get-started/create-token/" target="_blank" rel="noopener noreferrer">Create an API token</a>.</td></tr><tr><td>model_name</td><td>Model Name</td><td><a href="https://developers.cloudflare.com/workers-ai/models/#text-embeddings" target="_blank" rel="noopener noreferrer">List of supported models</a>.</td></tr><tr><td>strip_new_lines</td><td>Strip New Lines</td><td>Whether to strip new lines from the input text.</td></tr><tr><td>batch_size</td><td>Batch Size</td><td>The number of texts to embed in each batch.</td></tr><tr><td>api_base_url</td><td>Cloudflare API base URL</td><td>The base URL for the Cloudflare API.</td></tr><tr><td>headers</td><td>Headers</td><td>Additional request headers.</td></tr></tbody></table><p><strong>Outputs</strong></p><table><thead><tr><th>Name</th><th>Display Name</th><th>Info</th></tr></thead><tbody><tr><td>embeddings</td><td>Embeddings</td><td>An instance for generating embeddings using Cloudflare Workers.</td></tr></tbody></table></div></div></details>
|
||
<h2 class="anchor anchorWithHideOnScrollNavbar_WYt5" id="cohere-embeddings">Cohere Embeddings<a href="#cohere-embeddings" class="hash-link" aria-label="Direct link to Cohere Embeddings" title="Direct link to Cohere Embeddings"></a></h2>
|
||
<p>This component is used to load embedding models from <a href="https://cohere.com/" target="_blank" rel="noopener noreferrer">Cohere</a>.</p>
|
||
<details class="details_lb9f alert alert--info details_b_Ee" data-collapsed="true"><summary>Parameters</summary><div><div class="collapsibleContent_i85q"><p><strong>Inputs</strong></p><table><thead><tr><th>Name</th><th>Type</th><th>Description</th></tr></thead><tbody><tr><td>cohere_api_key</td><td>String</td><td>The API key required to authenticate with the Cohere service.</td></tr><tr><td>model</td><td>String</td><td>The language model used for embedding text documents and performing queries. Default: <code>embed-english-v2.0</code>.</td></tr><tr><td>truncate</td><td>Boolean</td><td>Whether to truncate the input text to fit within the model's constraints. Default: <code>False</code>.</td></tr></tbody></table><p><strong>Outputs</strong></p><table><thead><tr><th>Name</th><th>Type</th><th>Description</th></tr></thead><tbody><tr><td>embeddings</td><td>Embeddings</td><td>An instance for generating embeddings using Cohere.</td></tr></tbody></table></div></div></details>
|
||
<h2 class="anchor anchorWithHideOnScrollNavbar_WYt5" id="embedding-similarity">Embedding similarity<a href="#embedding-similarity" class="hash-link" aria-label="Direct link to Embedding similarity" title="Direct link to Embedding similarity"></a></h2>
|
||
<p>This component computes selected forms of similarity between two embedding vectors.</p>
|
||
<details class="details_lb9f alert alert--info details_b_Ee" data-collapsed="true"><summary>Parameters</summary><div><div class="collapsibleContent_i85q"><p><strong>Inputs</strong></p><table><thead><tr><th>Name</th><th>Display Name</th><th>Info</th></tr></thead><tbody><tr><td>embedding_vectors</td><td>Embedding Vectors</td><td>A list containing exactly two data objects with embedding vectors to compare.</td></tr><tr><td>similarity_metric</td><td>Similarity Metric</td><td>Select the similarity metric to use. Options: "Cosine Similarity", "Euclidean Distance", "Manhattan Distance".</td></tr></tbody></table><p><strong>Outputs</strong></p><table><thead><tr><th>Name</th><th>Display Name</th><th>Info</th></tr></thead><tbody><tr><td>similarity_data</td><td>Similarity Data</td><td>A data object containing the computed similarity score and additional information.</td></tr></tbody></table></div></div></details>
|
||
<h2 class="anchor anchorWithHideOnScrollNavbar_WYt5" id="google-generative-ai-embeddings">Google generative AI embeddings<a href="#google-generative-ai-embeddings" class="hash-link" aria-label="Direct link to Google generative AI embeddings" title="Direct link to Google generative AI embeddings"></a></h2>
|
||
<p>This component connects to Google's generative AI embedding service using the GoogleGenerativeAIEmbeddings class from the <code>langchain-google-genai</code> package.</p>
|
||
<details class="details_lb9f alert alert--info details_b_Ee" data-collapsed="true"><summary>Parameters</summary><div><div class="collapsibleContent_i85q"><p><strong>Inputs</strong></p><table><thead><tr><th>Name</th><th>Display Name</th><th>Info</th></tr></thead><tbody><tr><td>api_key</td><td>API Key</td><td>The secret API key for accessing Google's generative AI service. Required.</td></tr><tr><td>model_name</td><td>Model Name</td><td>The name of the embedding model to use. Default: "models/text-embedding-004".</td></tr></tbody></table><p><strong>Outputs</strong></p><table><thead><tr><th>Name</th><th>Display Name</th><th>Info</th></tr></thead><tbody><tr><td>embeddings</td><td>Embeddings</td><td>The built GoogleGenerativeAIEmbeddings object.</td></tr></tbody></table></div></div></details>
|
||
<h2 class="anchor anchorWithHideOnScrollNavbar_WYt5" id="hugging-face-embeddings">Hugging Face Embeddings<a href="#hugging-face-embeddings" class="hash-link" aria-label="Direct link to Hugging Face Embeddings" title="Direct link to Hugging Face Embeddings"></a></h2>
|
||
<div class="theme-admonition theme-admonition-note admonition_xJq3 alert alert--secondary"><div class="admonitionHeading_Gvgb"><span class="admonitionIcon_Rf37"><svg viewBox="0 0 14 16"><path fill-rule="evenodd" d="M6.3 5.69a.942.942 0 0 1-.28-.7c0-.28.09-.52.28-.7.19-.18.42-.28.7-.28.28 0 .52.09.7.28.18.19.28.42.28.7 0 .28-.09.52-.28.7a1 1 0 0 1-.7.3c-.28 0-.52-.11-.7-.3zM8 7.99c-.02-.25-.11-.48-.31-.69-.2-.19-.42-.3-.69-.31H6c-.27.02-.48.13-.69.31-.2.2-.3.44-.31.69h1v3c.02.27.11.5.31.69.2.2.42.31.69.31h1c.27 0 .48-.11.69-.31.2-.19.3-.42.31-.69H8V7.98v.01zM7 2.3c-3.14 0-5.7 2.54-5.7 5.68 0 3.14 2.56 5.7 5.7 5.7s5.7-2.55 5.7-5.7c0-3.15-2.56-5.69-5.7-5.69v.01zM7 .98c3.86 0 7 3.14 7 7s-3.14 7-7 7-7-3.12-7-7 3.14-7 7-7z"></path></svg></span>note</div><div class="admonitionContent_BuS1"><p>This component is deprecated as of Langflow version 1.0.18.
|
||
Instead, use the <a href="#hugging-face-embeddings-inference">Hugging Face Embeddings Inference component</a>.</p></div></div>
|
||
<p>This component loads embedding models from HuggingFace.</p>
|
||
<p>Use this component to generate embeddings using locally downloaded Hugging Face models. Ensure you have sufficient computational resources to run the models.</p>
|
||
<details class="details_lb9f alert alert--info details_b_Ee" data-collapsed="true"><summary>Parameters</summary><div><div class="collapsibleContent_i85q"><p><strong>Inputs</strong></p><table><thead><tr><th>Name</th><th>Display Name</th><th>Info</th></tr></thead><tbody><tr><td>Cache Folder</td><td>Cache Folder</td><td>The folder path to cache HuggingFace models.</td></tr><tr><td>Encode Kwargs</td><td>Encoding Arguments</td><td>Additional arguments for the encoding process.</td></tr><tr><td>Model Kwargs</td><td>Model Arguments</td><td>Additional arguments for the model.</td></tr><tr><td>Model Name</td><td>Model Name</td><td>The name of the HuggingFace model to use.</td></tr><tr><td>Multi Process</td><td>Multi-Process</td><td>Whether to use multiple processes.</td></tr></tbody></table><p><strong>Outputs</strong></p><table><thead><tr><th>Name</th><th>Display Name</th><th>Info</th></tr></thead><tbody><tr><td>embeddings</td><td>Embeddings</td><td>The generated embeddings.</td></tr></tbody></table></div></div></details>
|
||
<h2 class="anchor anchorWithHideOnScrollNavbar_WYt5" id="hugging-face-embeddings-inference">Hugging Face embeddings inference<a href="#hugging-face-embeddings-inference" class="hash-link" aria-label="Direct link to Hugging Face embeddings inference" title="Direct link to Hugging Face embeddings inference"></a></h2>
|
||
<p>This component generates embeddings using <a href="https://huggingface.co/" target="_blank" rel="noopener noreferrer">Hugging Face Inference API models</a> and requires a <a href="https://huggingface.co/docs/hub/security-tokens" target="_blank" rel="noopener noreferrer">Hugging Face API token</a> to authenticate. Local inference models do not require an API key.</p>
|
||
<p>Use this component to create embeddings with Hugging Face's hosted models, or to connect to your own locally hosted models.</p>
|
||
<details class="details_lb9f alert alert--info details_b_Ee" data-collapsed="true"><summary>Parameters</summary><div><div class="collapsibleContent_i85q"><p><strong>Inputs</strong></p><table><thead><tr><th>Name</th><th>Display Name</th><th>Info</th></tr></thead><tbody><tr><td>API Key</td><td>API Key</td><td>The API key for accessing the Hugging Face Inference API.</td></tr><tr><td>API URL</td><td>API URL</td><td>The URL of the Hugging Face Inference API.</td></tr><tr><td>Model Name</td><td>Model Name</td><td>The name of the model to use for embeddings.</td></tr></tbody></table><p><strong>Outputs</strong></p><table><thead><tr><th>Name</th><th>Display Name</th><th>Info</th></tr></thead><tbody><tr><td>embeddings</td><td>Embeddings</td><td>The generated embeddings.</td></tr></tbody></table></div></div></details>
|
||
<h3 class="anchor anchorWithHideOnScrollNavbar_WYt5" id="connect-the-hugging-face-component-to-a-local-embeddings-model">Connect the Hugging Face component to a local embeddings model<a href="#connect-the-hugging-face-component-to-a-local-embeddings-model" class="hash-link" aria-label="Direct link to Connect the Hugging Face component to a local embeddings model" title="Direct link to Connect the Hugging Face component to a local embeddings model"></a></h3>
|
||
<p>To run an embeddings inference locally, see the <a href="https://huggingface.co/docs/text-embeddings-inference/local_cpu" target="_blank" rel="noopener noreferrer">HuggingFace documentation</a>.</p>
|
||
<p>To connect the local Hugging Face model to the <strong>Hugging Face embeddings inference</strong> component and use it in a flow, follow these steps:</p>
|
||
<ol>
|
||
<li>Create a <a href="/vector-store-rag">Vector store RAG flow</a>.
|
||
There are two embeddings models in this flow that you can replace with <strong>Hugging Face</strong> embeddings inference components.</li>
|
||
<li>Replace both <strong>OpenAI</strong> embeddings model components with <strong>Hugging Face</strong> model components.</li>
|
||
<li>Connect both <strong>Hugging Face</strong> components to the <strong>Embeddings</strong> ports of the <strong>Astra DB vector store</strong> components.</li>
|
||
<li>In the <strong>Hugging Face</strong> components, set the <strong>Inference Endpoint</strong> field to the URL of your local inference model. <strong>The <strong>API Key</strong> field is not required for local inference.</strong></li>
|
||
<li>Run the flow. The local inference models generate embeddings for the input text.</li>
|
||
</ol>
|
||
<h2 class="anchor anchorWithHideOnScrollNavbar_WYt5" id="ibm-watsonx-embeddings">IBM watsonx embeddings<a href="#ibm-watsonx-embeddings" class="hash-link" aria-label="Direct link to IBM watsonx embeddings" title="Direct link to IBM watsonx embeddings"></a></h2>
|
||
<p>This component generates text using <a href="https://www.ibm.com/watsonx" target="_blank" rel="noopener noreferrer">IBM watsonx.ai</a> foundation models.</p>
|
||
<p>To use <strong>IBM watsonx.ai</strong> embeddings components, replace an embeddings component with the IBM watsonx.ai component in a flow.</p>
|
||
<p>An example document processing flow looks like the following:</p>
|
||
<p><img decoding="async" loading="lazy" alt="IBM watsonx embeddings model loading a chroma-db with split text" src="/assets/images/component-watsonx-embeddings-chroma-591e45d59ab635d1e1e68ab8036cfed7.png" width="1714" height="1486" class="img_ev3q"></p>
|
||
<p>This flow loads a PDF file from local storage and splits the text into chunks.</p>
|
||
<p>The <strong>IBM watsonx</strong> embeddings component converts the text chunks into embeddings, which are then stored in a Chroma DB vector store.</p>
|
||
<p>The values for <strong>API endpoint</strong>, <strong>Project ID</strong>, <strong>API key</strong>, and <strong>Model Name</strong> are found in your IBM watsonx.ai deployment.
|
||
For more information, see the <a href="https://python.langchain.com/docs/integrations/text_embedding/ibm_watsonx/" target="_blank" rel="noopener noreferrer">Langchain documentation</a>.</p>
|
||
<h3 class="anchor anchorWithHideOnScrollNavbar_WYt5" id="default-models">Default models<a href="#default-models" class="hash-link" aria-label="Direct link to Default models" title="Direct link to Default models"></a></h3>
|
||
<p>The component supports several default models with the following vector dimensions:</p>
|
||
<ul>
|
||
<li><code>sentence-transformers/all-minilm-l12-v2</code>: 384-dimensional embeddings</li>
|
||
<li><code>ibm/slate-125m-english-rtrvr-v2</code>: 768-dimensional embeddings</li>
|
||
<li><code>ibm/slate-30m-english-rtrvr-v2</code>: 768-dimensional embeddings</li>
|
||
<li><code>intfloat/multilingual-e5-large</code>: 1024-dimensional embeddings</li>
|
||
</ul>
|
||
<p>The component automatically fetches and updates the list of available models from your watsonx.ai instance when you provide your API endpoint and credentials.</p>
|
||
<details class="details_lb9f alert alert--info details_b_Ee" data-collapsed="true"><summary>Parameters</summary><div><div class="collapsibleContent_i85q"><p><strong>Inputs</strong></p><table><thead><tr><th>Name</th><th>Display Name</th><th>Info</th></tr></thead><tbody><tr><td>url</td><td>watsonx API Endpoint</td><td>The base URL of the API.</td></tr><tr><td>project_id</td><td>watsonx project id</td><td>The project ID for your watsonx.ai instance.</td></tr><tr><td>api_key</td><td>API Key</td><td>The API Key to use for the model.</td></tr><tr><td>model_name</td><td>Model Name</td><td>The name of the embedding model to use.</td></tr><tr><td>truncate_input_tokens</td><td>Truncate Input Tokens</td><td>The maximum number of tokens to process. Default: <code>200</code>.</td></tr><tr><td>input_text</td><td>Include the original text in the output</td><td>Determines if the original text is included in the output. Default: <code>True</code>.</td></tr></tbody></table><p><strong>Outputs</strong></p><table><thead><tr><th>Name</th><th>Display Name</th><th>Info</th></tr></thead><tbody><tr><td>embeddings</td><td>Embeddings</td><td>An instance for generating embeddings using watsonx.ai.</td></tr></tbody></table></div></div></details>
|
||
<h2 class="anchor anchorWithHideOnScrollNavbar_WYt5" id="lm-studio-embeddings">LM Studio Embeddings<a href="#lm-studio-embeddings" class="hash-link" aria-label="Direct link to LM Studio Embeddings" title="Direct link to LM Studio Embeddings"></a></h2>
|
||
<p>This component generates embeddings using <a href="https://lmstudio.ai/docs" target="_blank" rel="noopener noreferrer">LM Studio</a> models.</p>
|
||
<details class="details_lb9f alert alert--info details_b_Ee" data-collapsed="true"><summary>Parameters</summary><div><div class="collapsibleContent_i85q"><p><strong>Inputs</strong></p><table><thead><tr><th>Name</th><th>Display Name</th><th>Info</th></tr></thead><tbody><tr><td>model</td><td>Model</td><td>The LM Studio model to use for generating embeddings.</td></tr><tr><td>base_url</td><td>LM Studio Base URL</td><td>The base URL for the LM Studio API.</td></tr><tr><td>api_key</td><td>LM Studio API Key</td><td>The API key for authentication with LM Studio.</td></tr><tr><td>temperature</td><td>Model Temperature</td><td>The temperature setting for the model.</td></tr></tbody></table><p><strong>Outputs</strong></p><table><thead><tr><th>Name</th><th>Display Name</th><th>Info</th></tr></thead><tbody><tr><td>embeddings</td><td>Embeddings</td><td>The generated embeddings.</td></tr></tbody></table></div></div></details>
|
||
<h2 class="anchor anchorWithHideOnScrollNavbar_WYt5" id="mistralai">MistralAI<a href="#mistralai" class="hash-link" aria-label="Direct link to MistralAI" title="Direct link to MistralAI"></a></h2>
|
||
<p>This component generates embeddings using <a href="https://docs.mistral.ai/" target="_blank" rel="noopener noreferrer">MistralAI</a> models.</p>
|
||
<details class="details_lb9f alert alert--info details_b_Ee" data-collapsed="true"><summary>Parameters</summary><div><div class="collapsibleContent_i85q"><p><strong>Inputs</strong></p><table><thead><tr><th>Name</th><th>Type</th><th>Description</th></tr></thead><tbody><tr><td>model</td><td>String</td><td>The MistralAI model to use. Default: "mistral-embed".</td></tr><tr><td>mistral_api_key</td><td>SecretString</td><td>The API key for authenticating with MistralAI.</td></tr><tr><td>max_concurrent_requests</td><td>Integer</td><td>The maximum number of concurrent API requests. Default: 64.</td></tr><tr><td>max_retries</td><td>Integer</td><td>The maximum number of retry attempts for failed requests. Default: 5.</td></tr><tr><td>timeout</td><td>Integer</td><td>The request timeout in seconds. Default: 120.</td></tr><tr><td>endpoint</td><td>String</td><td>The custom API endpoint URL. Default: <code>https://api.mistral.ai/v1/</code>).</td></tr></tbody></table><p><strong>Outputs</strong></p><table><thead><tr><th>Name</th><th>Type</th><th>Description</th></tr></thead><tbody><tr><td>embeddings</td><td>Embeddings</td><td>A MistralAIEmbeddings instance for generating embeddings.</td></tr></tbody></table></div></div></details>
|
||
<h2 class="anchor anchorWithHideOnScrollNavbar_WYt5" id="nvidia">NVIDIA<a href="#nvidia" class="hash-link" aria-label="Direct link to NVIDIA" title="Direct link to NVIDIA"></a></h2>
|
||
<p>This component generates embeddings using <a href="https://docs.nvidia.com" target="_blank" rel="noopener noreferrer">NVIDIA models</a>.</p>
|
||
<details class="details_lb9f alert alert--info details_b_Ee" data-collapsed="true"><summary>Parameters</summary><div><div class="collapsibleContent_i85q"><p><strong>Inputs</strong></p><table><thead><tr><th>Name</th><th>Type</th><th>Description</th></tr></thead><tbody><tr><td>model</td><td>String</td><td>The NVIDIA model to use for embeddings, such as <code>nvidia/nv-embed-v1</code>.</td></tr><tr><td>base_url</td><td>String</td><td>The base URL for the NVIDIA API. Default: <code>https://integrate.api.nvidia.com/v1</code>.</td></tr><tr><td>nvidia_api_key</td><td>SecretString</td><td>The API key for authenticating with NVIDIA's service.</td></tr><tr><td>temperature</td><td>Float</td><td>The model temperature for embedding generation. Default: <code>0.1</code>.</td></tr></tbody></table><p><strong>Outputs</strong></p><table><thead><tr><th>Name</th><th>Type</th><th>Description</th></tr></thead><tbody><tr><td>embeddings</td><td>Embeddings</td><td>A NVIDIAEmbeddings instance for generating embeddings.</td></tr></tbody></table></div></div></details>
|
||
<h2 class="anchor anchorWithHideOnScrollNavbar_WYt5" id="ollama-embeddings">Ollama embeddings<a href="#ollama-embeddings" class="hash-link" aria-label="Direct link to Ollama embeddings" title="Direct link to Ollama embeddings"></a></h2>
|
||
<p>This component generates embeddings using <a href="https://ollama.com/" target="_blank" rel="noopener noreferrer">Ollama models</a>.</p>
|
||
<p>For a list of Ollama embeddings models, see the <a href="https://ollama.com/search?c=embedding" target="_blank" rel="noopener noreferrer">Ollama documentation</a>.</p>
|
||
<p>To use this component in a flow, connect Langflow to your locally running Ollama server and select an embeddings model.</p>
|
||
<ol>
|
||
<li>In the Ollama component, in the <strong>Ollama Base URL</strong> field, enter the address for your locally running Ollama server.
|
||
This value is set as the <code>OLLAMA_HOST</code> environment variable in Ollama. The default base URL is <code>http://localhost:11434</code>.</li>
|
||
<li>To refresh the server's list of models, click <svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-refresh-cw" aria-label="Refresh"><path d="M3 12a9 9 0 0 1 9-9 9.75 9.75 0 0 1 6.74 2.74L21 8"></path><path d="M21 3v5h-5"></path><path d="M21 12a9 9 0 0 1-9 9 9.75 9.75 0 0 1-6.74-2.74L3 16"></path><path d="M8 16H3v5"></path></svg>.</li>
|
||
<li>In the <strong>Ollama Model</strong> field, select an embeddings model. This example uses <code>all-minilm:latest</code>.</li>
|
||
<li>Connect the <strong>Ollama</strong> embeddings component to a flow.
|
||
For example, this flow connects a local Ollama server running a <code>all-minilm:latest</code> embeddings model to a <a href="/components-vector-stores#chroma-db">Chroma DB</a> vector store to generate embeddings for split text.</li>
|
||
</ol>
|
||
<p><img decoding="async" loading="lazy" alt="Ollama embeddings connected to Chroma DB" src="/assets/images/component-ollama-embeddings-chromadb-c02d6ef9e753b61c274778d90f2a6eec.png" width="1098" height="811" class="img_ev3q"></p>
|
||
<p>For more information, see the <a href="https://ollama.com/" target="_blank" rel="noopener noreferrer">Ollama documentation</a>.</p>
|
||
<details class="details_lb9f alert alert--info details_b_Ee" data-collapsed="true"><summary>Parameters</summary><div><div class="collapsibleContent_i85q"><p><strong>Inputs</strong></p><table><thead><tr><th>Name</th><th>Type</th><th>Description</th></tr></thead><tbody><tr><td>Ollama Model</td><td>String</td><td>The name of the Ollama model to use. Default: <code>llama2</code>.</td></tr><tr><td>Ollama Base URL</td><td>String</td><td>The base URL of the Ollama API. Default: <code>http://localhost:11434</code>.</td></tr><tr><td>Model Temperature</td><td>Float</td><td>The temperature parameter for the model. Adjusts the randomness in the generated embeddings.</td></tr></tbody></table><p><strong>Outputs</strong></p><table><thead><tr><th>Name</th><th>Type</th><th>Description</th></tr></thead><tbody><tr><td>embeddings</td><td>Embeddings</td><td>An instance for generating embeddings using Ollama.</td></tr></tbody></table></div></div></details>
|
||
<h2 class="anchor anchorWithHideOnScrollNavbar_WYt5" id="openai-embeddings">OpenAI Embeddings<a href="#openai-embeddings" class="hash-link" aria-label="Direct link to OpenAI Embeddings" title="Direct link to OpenAI Embeddings"></a></h2>
|
||
<p>This component is used to load embedding models from <a href="https://openai.com/" target="_blank" rel="noopener noreferrer">OpenAI</a>.</p>
|
||
<details class="details_lb9f alert alert--info details_b_Ee" data-collapsed="true"><summary>Parameters</summary><div><div class="collapsibleContent_i85q"><p><strong>Inputs</strong></p><table><thead><tr><th>Name</th><th>Type</th><th>Description</th></tr></thead><tbody><tr><td>OpenAI API Key</td><td>String</td><td>The API key to use for accessing the OpenAI API.</td></tr><tr><td>Default Headers</td><td>Dict</td><td>The default headers for the HTTP requests.</td></tr><tr><td>Default Query</td><td>NestedDict</td><td>The default query parameters for the HTTP requests.</td></tr><tr><td>Allowed Special</td><td>List</td><td>The special tokens allowed for processing. Default: <code>[]</code>.</td></tr><tr><td>Disallowed Special</td><td>List</td><td>The special tokens disallowed for processing. Default: <code>["all"]</code>.</td></tr><tr><td>Chunk Size</td><td>Integer</td><td>The chunk size for processing. Default: <code>1000</code>.</td></tr><tr><td>Client</td><td>Any</td><td>The HTTP client for making requests.</td></tr><tr><td>Deployment</td><td>String</td><td>The deployment name for the model. Default: <code>text-embedding-3-small</code>.</td></tr><tr><td>Embedding Context Length</td><td>Integer</td><td>The length of embedding context. Default: <code>8191</code>.</td></tr><tr><td>Max Retries</td><td>Integer</td><td>The maximum number of retries for failed requests. Default: <code>6</code>.</td></tr><tr><td>Model</td><td>String</td><td>The name of the model to use. Default: <code>text-embedding-3-small</code>.</td></tr><tr><td>Model Kwargs</td><td>NestedDict</td><td>Additional keyword arguments for the model.</td></tr><tr><td>OpenAI API Base</td><td>String</td><td>The base URL of the OpenAI API.</td></tr><tr><td>OpenAI API Type</td><td>String</td><td>The type of the OpenAI API.</td></tr><tr><td>OpenAI API Version</td><td>String</td><td>The version of the OpenAI API.</td></tr><tr><td>OpenAI Organization</td><td>String</td><td>The organization associated with the API key.</td></tr><tr><td>OpenAI Proxy</td><td>String</td><td>The proxy server for the requests.</td></tr><tr><td>Request Timeout</td><td>Float</td><td>The timeout for the HTTP requests.</td></tr><tr><td>Show Progress Bar</td><td>Boolean</td><td>Whether to show a progress bar for processing. Default: <code>False</code>.</td></tr><tr><td>Skip Empty</td><td>Boolean</td><td>Whether to skip empty inputs. Default: <code>False</code>.</td></tr><tr><td>TikToken Enable</td><td>Boolean</td><td>Whether to enable TikToken. Default: <code>True</code>.</td></tr><tr><td>TikToken Model Name</td><td>String</td><td>The name of the TikToken model.</td></tr></tbody></table><p><strong>Outputs</strong></p><table><thead><tr><th>Name</th><th>Type</th><th>Description</th></tr></thead><tbody><tr><td>embeddings</td><td>Embeddings</td><td>An instance for generating embeddings using OpenAI.</td></tr></tbody></table></div></div></details>
|
||
<h2 class="anchor anchorWithHideOnScrollNavbar_WYt5" id="text-embedder">Text embedder<a href="#text-embedder" class="hash-link" aria-label="Direct link to Text embedder" title="Direct link to Text embedder"></a></h2>
|
||
<p>This component generates embeddings for a given message using a specified embedding model.</p>
|
||
<details class="details_lb9f alert alert--info details_b_Ee" data-collapsed="true"><summary>Parameters</summary><div><div class="collapsibleContent_i85q"><p><strong>Inputs</strong></p><table><thead><tr><th>Name</th><th>Display Name</th><th>Info</th></tr></thead><tbody><tr><td>embedding_model</td><td>Embedding Model</td><td>The embedding model to use for generating embeddings.</td></tr><tr><td>message</td><td>Message</td><td>The message for which to generate embeddings.</td></tr></tbody></table><p><strong>Outputs</strong></p><table><thead><tr><th>Name</th><th>Display Name</th><th>Info</th></tr></thead><tbody><tr><td>embeddings</td><td>Embedding Data</td><td>A data object containing the original text and its embedding vector.</td></tr></tbody></table></div></div></details>
|
||
<h2 class="anchor anchorWithHideOnScrollNavbar_WYt5" id="vertexai-embeddings">VertexAI Embeddings<a href="#vertexai-embeddings" class="hash-link" aria-label="Direct link to VertexAI Embeddings" title="Direct link to VertexAI Embeddings"></a></h2>
|
||
<p>This component is a wrapper around <a href="https://cloud.google.com/vertex-ai" target="_blank" rel="noopener noreferrer">Google Vertex AI</a> <a href="https://cloud.google.com/vertex-ai/docs/generative-ai/embeddings/get-text-embeddings" target="_blank" rel="noopener noreferrer">Embeddings API</a>.</p>
|
||
<details class="details_lb9f alert alert--info details_b_Ee" data-collapsed="true"><summary>Parameters</summary><div><div class="collapsibleContent_i85q"><p><strong>Inputs</strong></p><table><thead><tr><th>Name</th><th>Type</th><th>Description</th></tr></thead><tbody><tr><td>credentials</td><td>Credentials</td><td>The default custom credentials to use.</td></tr><tr><td>location</td><td>String</td><td>The default location to use when making API calls. Default: <code>us-central1</code>.</td></tr><tr><td>max_output_tokens</td><td>Integer</td><td>The token limit determines the maximum amount of text output from one prompt. Default: <code>128</code>.</td></tr><tr><td>model_name</td><td>String</td><td>The name of the Vertex AI large language model. Default: <code>text-bison</code>.</td></tr><tr><td>project</td><td>String</td><td>The default GCP project to use when making Vertex API calls.</td></tr><tr><td>request_parallelism</td><td>Integer</td><td>The amount of parallelism allowed for requests issued to VertexAI models. Default: <code>5</code>.</td></tr><tr><td>temperature</td><td>Float</td><td>Tunes the degree of randomness in text generations. Should be a non-negative value. Default: <code>0</code>.</td></tr><tr><td>top_k</td><td>Integer</td><td>How the model selects tokens for output. The next token is selected from the top <code>k</code> tokens. Default: <code>40</code>.</td></tr><tr><td>top_p</td><td>Float</td><td>Tokens are selected from the most probable to least until the sum of their probabilities exceeds the top <code>p</code> value. Default: <code>0.95</code>.</td></tr><tr><td>tuned_model_name</td><td>String</td><td>The name of a tuned model. If provided, <code>model_name</code> is ignored.</td></tr><tr><td>verbose</td><td>Boolean</td><td>This parameter controls the level of detail in the output. When set to <code>True</code>, it prints internal states of the chain to help debug. Default: <code>False</code>.</td></tr></tbody></table><p><strong>Outputs</strong></p><table><thead><tr><th>Name</th><th>Type</th><th>Description</th></tr></thead><tbody><tr><td>embeddings</td><td>Embeddings</td><td>An instance for generating embeddings using VertexAI.</td></tr></tbody></table></div></div></details></div></article><nav class="pagination-nav docusaurus-mt-lg" aria-label="Docs pages"><a class="pagination-nav__link pagination-nav__link--prev" href="/components-data"><div class="pagination-nav__sublabel">Previous</div><div class="pagination-nav__label">Data</div></a><a class="pagination-nav__link pagination-nav__link--next" href="/components-helpers"><div class="pagination-nav__sublabel">Next</div><div class="pagination-nav__label">Helpers</div></a></nav></div></div><div class="col col--3"><div class="tableOfContents_bqdL thin-scrollbar theme-doc-toc-desktop"><ul class="table-of-contents table-of-contents__left-border"><li><a href="#use-an-embeddings-model-component-in-a-flow" class="table-of-contents__link toc-highlight">Use an embeddings model component in a flow</a></li><li><a href="#aiml" class="table-of-contents__link toc-highlight">AI/ML</a></li><li><a href="#amazon-bedrock-embeddings" class="table-of-contents__link toc-highlight">Amazon Bedrock Embeddings</a></li><li><a href="#astra-db-vectorize" class="table-of-contents__link toc-highlight">Astra DB vectorize</a></li><li><a href="#azure-openai-embeddings" class="table-of-contents__link toc-highlight">Azure OpenAI Embeddings</a></li><li><a href="#cloudflare-workers-ai-embeddings" class="table-of-contents__link toc-highlight">Cloudflare Workers AI Embeddings</a></li><li><a href="#cohere-embeddings" class="table-of-contents__link toc-highlight">Cohere Embeddings</a></li><li><a href="#embedding-similarity" class="table-of-contents__link toc-highlight">Embedding similarity</a></li><li><a href="#google-generative-ai-embeddings" class="table-of-contents__link toc-highlight">Google generative AI embeddings</a></li><li><a href="#hugging-face-embeddings" class="table-of-contents__link toc-highlight">Hugging Face Embeddings</a></li><li><a href="#hugging-face-embeddings-inference" class="table-of-contents__link toc-highlight">Hugging Face embeddings inference</a><ul><li><a href="#connect-the-hugging-face-component-to-a-local-embeddings-model" class="table-of-contents__link toc-highlight">Connect the Hugging Face component to a local embeddings model</a></li></ul></li><li><a href="#ibm-watsonx-embeddings" class="table-of-contents__link toc-highlight">IBM watsonx embeddings</a><ul><li><a href="#default-models" class="table-of-contents__link toc-highlight">Default models</a></li></ul></li><li><a href="#lm-studio-embeddings" class="table-of-contents__link toc-highlight">LM Studio Embeddings</a></li><li><a href="#mistralai" class="table-of-contents__link toc-highlight">MistralAI</a></li><li><a href="#nvidia" class="table-of-contents__link toc-highlight">NVIDIA</a></li><li><a href="#ollama-embeddings" class="table-of-contents__link toc-highlight">Ollama embeddings</a></li><li><a href="#openai-embeddings" class="table-of-contents__link toc-highlight">OpenAI Embeddings</a></li><li><a href="#text-embedder" class="table-of-contents__link toc-highlight">Text embedder</a></li><li><a href="#vertexai-embeddings" class="table-of-contents__link toc-highlight">VertexAI Embeddings</a></li></ul></div></div></div></div></main></div></div></div><footer class="footer"><div class="container container-fluid"><div class="row footer__links"><div class="col footer__col"><div class="footer__title"></div><ul class="footer__items clean-list"><li class="footer__item"><div class="footer-links">
|
||
<span>© 2025 Langflow</span>
|
||
<span id="preferenceCenterContainer"> · <a href="https://langflow.org/preferences">Manage Privacy Choices</a></span>
|
||
</div></li></ul></div></div><div class="footer__bottom text--center"><div class="margin-bottom--sm"><img src="/img/lf-docs-light.svg" alt="Langflow" class="footer__logo themedComponent_mlkZ themedComponent--light_NVdE" width="160" height="40"><img src="/img/lf-docs-dark.svg" alt="Langflow" class="footer__logo themedComponent_mlkZ themedComponent--dark_xIcU" width="160" height="40"></div></div></div></footer><div style="position:fixed;right:20px;bottom:20px;z-index:100;display:flex;align-items:center;gap:10px;cursor:pointer"><div style="background-color:#f6f6f6;border-radius:50%;width:48px;height:48px;display:flex;align-items:center;justify-content:center;box-shadow:0 2px 4px rgba(0,0,0,0.1)"><img src="/img/langflow-icon-black-transparent.svg" style="width:40px" alt="Search"></div></div></div>
|
||
</body>
|
||
</html> |