langchain/libs/community/langchain_community/embeddings
L 8ef0df3539
feat: add batch request support for text-embedding-v3 model (#26375)
PR title: “langchain: add batch request support for text-embedding-v3
model”

PR message:

• Description: This PR introduces batch request support for the
text-embedding-v3 model within LangChain. The new functionality allows
users to process multiple text inputs in a single request, improving
efficiency and performance for high-volume applications.
	•	Issue: This PR addresses #<issue_number> (if applicable).
• Dependencies: No new external dependencies are required for this
change.
• Twitter handle: If announced on Twitter, please mention me at
@yourhandle.

Add tests and docs:

1. Added unit tests to cover the batch request functionality, ensuring
it operates without requiring network access.
2. Included an example notebook demonstrating the batch request feature,
located in docs/docs/integrations.

Lint and test: All required formatting and linting checks have been
performed using make format and make lint. The changes have been
verified with make test to ensure compatibility.

Additional notes:

	•	The changes are fully backwards compatible.
• No modifications were made to pyproject.toml, ensuring no new
dependencies were added.
• The update only affects the langchain package and does not involve
other packages.

---------

Co-authored-by: Chester Curme <chester.curme@gmail.com>
2024-10-31 18:56:22 +00:00
..
__init__.py community: Add Naver chat model & embeddings (#25162) 2024-10-24 20:54:13 +00:00
aleph_alpha.py multiple: pydantic 2 compatibility, v0.3 (#26443) 2024-09-13 14:38:45 -07:00
anyscale.py all: test 3.13 ci (#27197) 2024-10-25 12:56:58 -07:00
ascend.py community[patch]: Fix missing protected_namespaces(). (#27610) 2024-10-25 02:16:26 +00:00
awa.py multiple: pydantic 2 compatibility, v0.3 (#26443) 2024-09-13 14:38:45 -07:00
azure_openai.py all: test 3.13 ci (#27197) 2024-10-25 12:56:58 -07:00
baichuan.py multiple: pydantic 2 compatibility, v0.3 (#26443) 2024-09-13 14:38:45 -07:00
baidu_qianfan_endpoint.py community[patch]: Fix missing protected_namespaces(). (#27610) 2024-10-25 02:16:26 +00:00
bedrock.py multiple: pydantic 2 compatibility, v0.3 (#26443) 2024-09-13 14:38:45 -07:00
bookend.py community[patch]: Fix missing protected_namespaces(). (#27610) 2024-10-25 02:16:26 +00:00
clarifai.py multiple: pydantic 2 compatibility, v0.3 (#26443) 2024-09-13 14:38:45 -07:00
cloudflare_workersai.py multiple: pydantic 2 compatibility, v0.3 (#26443) 2024-09-13 14:38:45 -07:00
clova.py community: Add Naver chat model & embeddings (#25162) 2024-10-24 20:54:13 +00:00
cohere.py multiple: pydantic 2 compatibility, v0.3 (#26443) 2024-09-13 14:38:45 -07:00
dashscope.py feat: add batch request support for text-embedding-v3 model (#26375) 2024-10-31 18:56:22 +00:00
databricks.py community: Add deprecation notice for Databricks integration in langchain-community (#27355) 2024-10-16 02:20:40 +00:00
deepinfra.py multiple: pydantic 2 compatibility, v0.3 (#26443) 2024-09-13 14:38:45 -07:00
edenai.py multiple: pydantic 2 compatibility, v0.3 (#26443) 2024-09-13 14:38:45 -07:00
elasticsearch.py
embaas.py multiple: pydantic 2 compatibility, v0.3 (#26443) 2024-09-13 14:38:45 -07:00
ernie.py community[patch]: Fix missing protected_namespaces(). (#27610) 2024-10-25 02:16:26 +00:00
fake.py multiple: pydantic 2 compatibility, v0.3 (#26443) 2024-09-13 14:38:45 -07:00
fastembed.py Bug-Fix[Community] Fix FastEmbedEmbeddings (#26764) 2024-09-30 21:23:08 -04:00
gigachat.py multiple: pydantic 2 compatibility, v0.3 (#26443) 2024-09-13 14:38:45 -07:00
google_palm.py community[patch]: Fix missing protected_namespaces(). (#27610) 2024-10-25 02:16:26 +00:00
gpt4all.py community[patch]: Fix missing protected_namespaces(). (#27610) 2024-10-25 02:16:26 +00:00
gradient_ai.py multiple: pydantic 2 compatibility, v0.3 (#26443) 2024-09-13 14:38:45 -07:00
huggingface_hub.py multiple: pydantic 2 compatibility, v0.3 (#26443) 2024-09-13 14:38:45 -07:00
huggingface.py Remove pydantic restricted namespaces from HuggingFaceInferenceAPIEmbedings (#26744) 2024-09-22 08:05:37 -04:00
infinity_local.py community[patch]: Fix missing protected_namespaces(). (#27610) 2024-10-25 02:16:26 +00:00
infinity.py community: Fix closed session in Infinity (#26933) 2024-10-27 11:37:21 -04:00
ipex_llm.py multiple: pydantic 2 compatibility, v0.3 (#26443) 2024-09-13 14:38:45 -07:00
itrex.py community[patch]: Fix missing protected_namespaces(). (#27610) 2024-10-25 02:16:26 +00:00
javelin_ai_gateway.py multiple: pydantic 2 compatibility, v0.3 (#26443) 2024-09-13 14:38:45 -07:00
jina.py community[patch]: Fix missing protected_namespaces(). (#27610) 2024-10-25 02:16:26 +00:00
johnsnowlabs.py multiple: pydantic 2 compatibility, v0.3 (#26443) 2024-09-13 14:38:45 -07:00
laser.py multiple: pydantic 2 compatibility, v0.3 (#26443) 2024-09-13 14:38:45 -07:00
llamacpp.py community[patch]: Fix missing protected_namespaces(). (#27610) 2024-10-25 02:16:26 +00:00
llamafile.py multiple: pydantic 2 compatibility, v0.3 (#26443) 2024-09-13 14:38:45 -07:00
llm_rails.py multiple: pydantic 2 compatibility, v0.3 (#26443) 2024-09-13 14:38:45 -07:00
localai.py all: test 3.13 ci (#27197) 2024-10-25 12:56:58 -07:00
minimax.py multiple: pydantic 2 compatibility, v0.3 (#26443) 2024-09-13 14:38:45 -07:00
mlflow_gateway.py multiple: pydantic 2 compatibility, v0.3 (#26443) 2024-09-13 14:38:45 -07:00
mlflow.py multiple: pydantic 2 compatibility, v0.3 (#26443) 2024-09-13 14:38:45 -07:00
modelscope_hub.py multiple: pydantic 2 compatibility, v0.3 (#26443) 2024-09-13 14:38:45 -07:00
mosaicml.py multiple: pydantic 2 compatibility, v0.3 (#26443) 2024-09-13 14:38:45 -07:00
naver.py community: Add Naver chat model & embeddings (#25162) 2024-10-24 20:54:13 +00:00
nemo.py multiple: pydantic 2 compatibility, v0.3 (#26443) 2024-09-13 14:38:45 -07:00
nlpcloud.py community[patch]: Fix missing protected_namespaces(). (#27610) 2024-10-25 02:16:26 +00:00
oci_generative_ai.py multiple: pydantic 2 compatibility, v0.3 (#26443) 2024-09-13 14:38:45 -07:00
octoai_embeddings.py all: test 3.13 ci (#27197) 2024-10-25 12:56:58 -07:00
ollama.py community: deprecate community ollama integrations (#26733) 2024-10-01 09:18:07 -07:00
openai.py all: test 3.13 ci (#27197) 2024-10-25 12:56:58 -07:00
openvino.py multiple: pydantic 2 compatibility, v0.3 (#26443) 2024-09-13 14:38:45 -07:00
optimum_intel.py community[patch]: Fix missing protected_namespaces(). (#27610) 2024-10-25 02:16:26 +00:00
oracleai.py multiple: pydantic 2 compatibility, v0.3 (#26443) 2024-09-13 14:38:45 -07:00
ovhcloud.py multiple: pydantic 2 compatibility, v0.3 (#26443) 2024-09-13 14:38:45 -07:00
premai.py multiple: pydantic 2 compatibility, v0.3 (#26443) 2024-09-13 14:38:45 -07:00
sagemaker_endpoint.py multiple: pydantic 2 compatibility, v0.3 (#26443) 2024-09-13 14:38:45 -07:00
sambanova.py community[patch]: Fix missing protected_namespaces(). (#27610) 2024-10-25 02:16:26 +00:00
self_hosted_hugging_face.py
self_hosted.py multiple: pydantic 2 compatibility, v0.3 (#26443) 2024-09-13 14:38:45 -07:00
sentence_transformer.py
solar.py multiple: pydantic 2 compatibility, v0.3 (#26443) 2024-09-13 14:38:45 -07:00
spacy_embeddings.py all: test 3.13 ci (#27197) 2024-10-25 12:56:58 -07:00
sparkllm.py multiple: pydantic 2 compatibility, v0.3 (#26443) 2024-09-13 14:38:45 -07:00
tensorflow_hub.py community[patch]: Fix missing protected_namespaces(). (#27610) 2024-10-25 02:16:26 +00:00
text2vec.py community[patch]: Fix missing protected_namespaces(). (#27610) 2024-10-25 02:16:26 +00:00
textembed.py multiple: pydantic 2 compatibility, v0.3 (#26443) 2024-09-13 14:38:45 -07:00
titan_takeoff.py multiple: pydantic 2 compatibility, v0.3 (#26443) 2024-09-13 14:38:45 -07:00
vertexai.py all: test 3.13 ci (#27197) 2024-10-25 12:56:58 -07:00
volcengine.py multiple: pydantic 2 compatibility, v0.3 (#26443) 2024-09-13 14:38:45 -07:00
voyageai.py multiple: pydantic 2 compatibility, v0.3 (#26443) 2024-09-13 14:38:45 -07:00
xinference.py
yandex.py multiple: pydantic 2 compatibility, v0.3 (#26443) 2024-09-13 14:38:45 -07:00
zhipuai.py multiple: pydantic 2 compatibility, v0.3 (#26443) 2024-09-13 14:38:45 -07:00