docs: ollama model and embeddings examples (#7672)
* ollama-model-component * ollama-embeddings-example * screenshot-and-model-name
This commit is contained in:
parent
4ced646597
commit
0d61f61e52
4 changed files with 30 additions and 2 deletions
|
|
@ -3,6 +3,8 @@ title: Embeddings
|
||||||
slug: /components-embedding-models
|
slug: /components-embedding-models
|
||||||
---
|
---
|
||||||
|
|
||||||
|
import Icon from "@site/src/components/icon";
|
||||||
|
|
||||||
# Embeddings models in Langflow
|
# 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.
|
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 |
|
| embeddings | Embeddings | NVIDIAEmbeddings instance for generating embeddings |
|
||||||
|
|
||||||
## Ollama Embeddings
|
## Ollama embeddings
|
||||||
|
|
||||||
This component generates embeddings using [Ollama models](https://ollama.com/).
|
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 <Icon name="RefreshCw" aria-label="Refresh"/>.
|
||||||
|
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.
|
||||||
|
|
||||||
|

|
||||||
|
|
||||||
|
For more information, see the [Ollama documentation](https://ollama.com/).
|
||||||
|
|
||||||
### Inputs
|
### Inputs
|
||||||
|
|
||||||
| Name | Type | Description |
|
| Name | Type | Description |
|
||||||
|
|
|
||||||
|
|
@ -458,7 +458,18 @@ For more information, see [NVIDIA AI documentation](https://developer.nvidia.com
|
||||||
|
|
||||||
This component generates text using Ollama's language models.
|
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 <Icon name="RefreshCw" aria-label="Refresh"/>.
|
||||||
|
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.
|
||||||
|
|
||||||
|

|
||||||
|
|
||||||
|
For more information, see the [Ollama documentation](https://ollama.com/).
|
||||||
|
|
||||||
### Inputs
|
### Inputs
|
||||||
|
|
||||||
|
|
|
||||||
BIN
docs/static/img/component-ollama-embeddings-chromadb.png
vendored
Normal file
BIN
docs/static/img/component-ollama-embeddings-chromadb.png
vendored
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 192 KiB |
BIN
docs/static/img/component-ollama-model.png
vendored
Normal file
BIN
docs/static/img/component-ollama-model.png
vendored
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 1.2 MiB |
Loading…
Add table
Add a link
Reference in a new issue