diff --git a/docs/docs/Components/components-embedding-models.md b/docs/docs/Components/components-embedding-models.md index abc270871..5bd97b1bf 100644 --- a/docs/docs/Components/components-embedding-models.md +++ b/docs/docs/Components/components-embedding-models.md @@ -3,6 +3,8 @@ title: Embeddings slug: /components-embedding-models --- +import Icon from "@site/src/components/icon"; + # Embeddings models in Langflow Embeddings models convert text into numerical vectors. These embeddings capture semantic meaning of the input text, and allow LLMs to understand context. @@ -343,10 +345,25 @@ This component generates embeddings using [NVIDIA models](https://docs.nvidia.co |------|------|-------------| | embeddings | Embeddings | NVIDIAEmbeddings instance for generating embeddings | -## Ollama Embeddings +## Ollama embeddings This component generates embeddings using [Ollama models](https://ollama.com/). +For a list of Ollama embeddings models, see the [Ollama documentation](https://ollama.com/search?c=embedding). + +To use this component in a flow, connect Langflow to your locally running Ollama server and select an embeddings model. + +1. In the Ollama component, in the **Ollama Base URL** field, enter the address for your locally running Ollama server. +This value is set as the `OLLAMA_HOST` environment variable in Ollama. The default base URL is `http://127.0.0.1:11434`. +2. To refresh the server's list of models, click . +3. In the **Ollama Model** field, select an embeddings model. This example uses `all-minilm:latest`. +4. Connect the **Ollama** embeddings component to a flow. +For example, this flow connects a local Ollama server running a `all-minilm:latest` embeddings model to a [Chroma DB](/components-vector-stores#chroma) vector store to generate embeddings for split text. + +![Ollama embeddings connected to Chroma DB](/img/component-ollama-embeddings-chromadb.png) + +For more information, see the [Ollama documentation](https://ollama.com/). + ### Inputs | Name | Type | Description | diff --git a/docs/docs/Components/components-models.md b/docs/docs/Components/components-models.md index e42d4a4d8..258ba9c5a 100644 --- a/docs/docs/Components/components-models.md +++ b/docs/docs/Components/components-models.md @@ -458,7 +458,18 @@ For more information, see [NVIDIA AI documentation](https://developer.nvidia.com This component generates text using Ollama's language models. -For more information, see [Ollama documentation](https://ollama.com/). +To use this component in a flow, connect Langflow to your locally running Ollama server and select a model. + +1. In the Ollama component, in the **Base URL** field, enter the address for your locally running Ollama server. +This value is set as the `OLLAMA_HOST` environment variable in Ollama. +The default base URL is `http://127.0.0.1:11434`. +2. To refresh the server's list of models, click . +3. In the **Model Name** field, select a model. This example uses `llama3.2:latest`. +4. Connect the **Ollama** model component to a flow. For example, this flow connects a local Ollama server running a Llama 3.2 model as the custom model for an [Agent](/components-agents) component. + +![Ollama model as Agent custom model](/img/component-ollama-model.png) + +For more information, see the [Ollama documentation](https://ollama.com/). ### Inputs diff --git a/docs/static/img/component-ollama-embeddings-chromadb.png b/docs/static/img/component-ollama-embeddings-chromadb.png new file mode 100644 index 000000000..c4765f7ea Binary files /dev/null and b/docs/static/img/component-ollama-embeddings-chromadb.png differ diff --git a/docs/static/img/component-ollama-model.png b/docs/static/img/component-ollama-model.png new file mode 100644 index 000000000..d19c5bc54 Binary files /dev/null and b/docs/static/img/component-ollama-model.png differ