You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: api-reference/how-to/embedding.mdx
+24-24Lines changed: 24 additions & 24 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -43,41 +43,41 @@ To use the Ingest CLI or Ingest Python library to generate embeddings, do the fo
43
43
44
44
1. Choose an embedding provider that you want to use from among the following allowed providers, and note the provider's ID:
45
45
46
-
- The provider ID `langchain-aws-bedrock` for [Amazon Bedrock](https://aws.amazon.com/bedrock/). [Learn more](https://python.langchain.com/v0.2/docs/integrations/text_embedding/bedrock/).
47
-
-`langchain-huggingface` for [Hugging Face](https://huggingface.co/). [Learn more](https://python.langchain.com/v0.2/docs/integrations/text_embedding/huggingfacehub/).
48
-
-`langchain-openai` for [OpenAI](https://openai.com/). [Learn more](https://python.langchain.com/v0.2/docs/integrations/text_embedding/openai/).
49
-
-`langchain-vertexai` for [Google Vertex AI PaLM](https://cloud.google.com/vertex-ai/docs/generative-ai/learn/overview). [Learn more](https://python.langchain.com/v0.2/docs/integrations/text_embedding/google_vertex_ai_palm/).
50
-
-`langchain-voyageai` for [Voyage AI](https://www.voyageai.com/). [Learn more](https://python.langchain.com/v0.2/docs/integrations/text_embedding/voyageai/).
46
+
- The provider ID `aws-bedrock` for [Amazon Bedrock](https://aws.amazon.com/bedrock/). [Learn more](https://python.langchain.com/v0.2/docs/integrations/text_embedding/bedrock/).
47
+
-`huggingface` for [Hugging Face](https://huggingface.co/). [Learn more](https://python.langchain.com/v0.2/docs/integrations/text_embedding/huggingfacehub/).
48
+
-`openai` for [OpenAI](https://openai.com/). [Learn more](https://python.langchain.com/v0.2/docs/integrations/text_embedding/openai/).
49
+
-`vertexai` for [Google Vertex AI PaLM](https://cloud.google.com/vertex-ai/docs/generative-ai/learn/overview). [Learn more](https://python.langchain.com/v0.2/docs/integrations/text_embedding/google_vertex_ai_palm/).
50
+
-`voyageai` for [Voyage AI](https://www.voyageai.com/). [Learn more](https://python.langchain.com/v0.2/docs/integrations/text_embedding/voyageai/).
51
51
-`mixedbread-ai` for [Mixedbread](https://www.mixedbread.ai/). [Learn more](https://www.mixedbread.ai/docs/embeddings/overview).
52
52
-`octoai` for [Octo AI](https://octo.ai/). [Learn more](https://octo.ai/docs/text-gen-solution/using-unstructured-io-for-embedding-documents).
53
53
54
54
2. Run the following command to install the required Python package for the embedding provider:
55
55
56
-
- For `langchain-aws-bedrock`, run `pip install "unstructured-ingest[bedrock]"`.
57
-
- For `langchain-huggingface`, run `pip install "unstructured-ingest[embed-huggingface]"`.
58
-
- For `langchain-openai`, run `pip install "unstructured-ingest[openai]"`.
59
-
- For `langchain-vertexai`, run `pip install "unstructured-ingest[embed-vertexai]"`.
60
-
- For `langchain-voyageai`, run `pip install "unstructured-ingest[embed-voyageai]"`.
56
+
- For `aws-bedrock`, run `pip install "unstructured-ingest[bedrock]"`.
57
+
- For `huggingface`, run `pip install "unstructured-ingest[embed-huggingface]"`.
58
+
- For `openai`, run `pip install "unstructured-ingest[openai]"`.
59
+
- For `vertexai`, run `pip install "unstructured-ingest[embed-vertexai]"`.
60
+
- For `voyageai`, run `pip install "unstructured-ingest[embed-voyageai]"`.
61
61
- For `mixedbread-ai`, run `pip install "unstructured-ingest[embed-mixedbreadai]"`.
62
62
- For `octoai`, run `pip install "unstructured-ingest[embed-octoai]"`.
63
63
64
64
3. For the following embedding providers, you can choose the model that you want to use. If you do choose a model, note the model's name:
65
65
66
-
-`langchain-aws-bedrock`. [Choose a model](https://docs.aws.amazon.com/bedrock/latest/userguide/model-ids.html). No default model is provided. [Learn more about the supported models](https://docs.aws.amazon.com/bedrock/latest/userguide/models-supported.html).
67
-
-`langchain-huggingface`. [Choose a model](https://huggingface.co/models?other=embeddings), or use the default model [sentence-transformers/all-MiniLM-L6-v2](https://huggingface.co/sentence-transformers/all-MiniLM-L6-v2).
68
-
-`langchain-openai`. [Choose a model](https://platform.openai.com/docs/guides/embeddings/embedding-models), or use the default model `text-embedding-ada-002`.
69
-
-`langchain-vertexai`. [Choose a model](https://cloud.google.com/vertex-ai/generative-ai/docs/model-reference/text-embeddings-api), or use the default model `textembedding-gecko@001`.
70
-
-`langchain-voyageai`. [Choose a model](https://docs.voyageai.com/docs/embeddings). No default model is provided.
66
+
-`aws-bedrock`. [Choose a model](https://docs.aws.amazon.com/bedrock/latest/userguide/model-ids.html). No default model is provided. [Learn more about the supported models](https://docs.aws.amazon.com/bedrock/latest/userguide/models-supported.html).
67
+
-`huggingface`. [Choose a model](https://huggingface.co/models?other=embeddings), or use the default model [sentence-transformers/all-MiniLM-L6-v2](https://huggingface.co/sentence-transformers/all-MiniLM-L6-v2).
68
+
-`openai`. [Choose a model](https://platform.openai.com/docs/guides/embeddings/embedding-models), or use the default model `text-embedding-ada-002`.
69
+
-`vertexai`. [Choose a model](https://cloud.google.com/vertex-ai/generative-ai/docs/model-reference/text-embeddings-api), or use the default model `textembedding-gecko@001`.
70
+
-`voyageai`. [Choose a model](https://docs.voyageai.com/docs/embeddings). No default model is provided.
71
71
-`mixedbread-ai`. [Choose a model](https://www.mixedbread.ai/docs/embeddings/models), or use the default model [mixedbread-ai/mxbai-embed-large-v1](https://www.mixedbread.ai/docs/embeddings/mxbai-embed-large-v1).
72
72
-`octoai`. [Choose a model](https://octo.ai/blog/supercharge-rag-performance-using-octoai-and-unstructured-embeddings/), or use the default model `thenlper/gte-large`.
73
73
74
74
4. Note the special settings to connect to the provider:
75
75
76
-
- For `langchain-aws-bedrock`, you'll need an AWS access key value, the corresponding AWS secret access key value, and the corresponding AWS Region identifier. [Get an AWS access key and secret access key](https://docs.aws.amazon.com/IAM/latest/UserGuide/id_credentials_access-keys.html).
77
-
- For `langchain-huggingface`, if you use a gated model (a model with special conditions that you must accept before you can use it, or a privately published model), you'll need an HF inference API key value, beginning with `hf_`. [Get an HF inference API key](https://huggingface.co/docs/api-inference/en/quicktour#get-your-api-token). To learn whether your model requires an HF inference API key, see your model provider's documentation.
78
-
- For `langchain-openai`, you'll need an OpenAI API key value. [Get an OpenAI API key](https://platform.openai.com/docs/quickstart/create-and-export-an-api-key).
79
-
- For `langchain-vertexai`, you'll need the path to a Google Cloud credentials JSON file. Learn more [here](https://cloud.google.com/docs/authentication/application-default-credentials#GAC) and [here](https://googleapis.dev/python/google-auth/latest/reference/google.auth.html#module-google.auth).
80
-
- For `langchain-voyageai`, you'll need a Voyage AI API key value. [Get a Voyage AI API key](https://docs.voyageai.com/docs/api-key-and-installation#authentication-with-api-keys).
76
+
- For `aws-bedrock`, you'll need an AWS access key value, the corresponding AWS secret access key value, and the corresponding AWS Region identifier. [Get an AWS access key and secret access key](https://docs.aws.amazon.com/IAM/latest/UserGuide/id_credentials_access-keys.html).
77
+
- For `huggingface`, if you use a gated model (a model with special conditions that you must accept before you can use it, or a privately published model), you'll need an HF inference API key value, beginning with `hf_`. [Get an HF inference API key](https://huggingface.co/docs/api-inference/en/quicktour#get-your-api-token). To learn whether your model requires an HF inference API key, see your model provider's documentation.
78
+
- For `openai`, you'll need an OpenAI API key value. [Get an OpenAI API key](https://platform.openai.com/docs/quickstart/create-and-export-an-api-key).
79
+
- For `vertexai`, you'll need the path to a Google Cloud credentials JSON file. Learn more [here](https://cloud.google.com/docs/authentication/application-default-credentials#GAC) and [here](https://googleapis.dev/python/google-auth/latest/reference/google.auth.html#module-google.auth).
80
+
- For `voyageai`, you'll need a Voyage AI API key value. [Get a Voyage AI API key](https://docs.voyageai.com/docs/api-key-and-installation#authentication-with-api-keys).
81
81
- For `mixedbread-ai`, you'll need a Mixedbread API key value. [Get a Mixedbread API key](https://www.mixedbread.ai/dashboard?next=api-keys).
82
82
- For `octoai`, you'll need an Octo AI API token value. [Get an Octo AI API token](https://octo.ai/docs/getting-started/how-to-create-octoai-access-token).
83
83
@@ -87,10 +87,10 @@ To use the Ingest CLI or Ingest Python library to generate embeddings, do the fo
87
87
<Accordiontitle="Ingest CLI">
88
88
For the [source connector](/api-reference/ingest/source-connectors/overview) command:
89
89
90
-
- Set the command's `--embedding-provider` to the provider's ID, for example `langchain-huggingface`.
90
+
- Set the command's `--embedding-provider` to the provider's ID, for example `huggingface`.
91
91
- Set `--embedding-model-name` to the model name, as applicable, for example `sentence-transformers/sentence-t5-xl`. Or omit this to use the default model, as applicable.
92
92
- Set `--embedding-api-key` to the provider's required API key value or credentials JSON file path, as appropriate.
93
-
- For `langchain-aws-bedrock`:
93
+
- For `aws-bedrock`:
94
94
95
95
- Set `--embedding-aws-access-key-id` to the AWS access key value.
96
96
- Set `--embedding-aws-secret-access-key` to the corresponding AWS secret access key value.
@@ -99,10 +99,10 @@ To use the Ingest CLI or Ingest Python library to generate embeddings, do the fo
99
99
<Accordiontitle="Ingest Python library">
100
100
For the [source connector's](/api-reference/ingest/source-connectors/overview)`EmbedderConfig` object:
101
101
102
-
- Set the `embedding_provider` parameter to the provider's ID, for example `langchain-huggingface`.
102
+
- Set the `embedding_provider` parameter to the provider's ID, for example `huggingface`.
103
103
- Set `embedding_model_name` to the model name, as applicable, for example `sentence-transformers/sentence-t5-xl`. Or omit this to use the default model, as applicable.
104
104
- Set `embedding_api_key` to the provider's required API key value or credentials JSON file path, as appropriate.
105
-
- For `langchain-aws-bedrock`:
105
+
- For `aws-bedrock`:
106
106
107
107
- Set `embedding_aws_access_key_id` to the AWS access key value.
108
108
- Set `embedding_aws_secret_access_key` to the corresponding AWS secret access key value.
0 commit comments