langchain/libs/community/langchain_community/embeddings
Julien Elkaim e586bffe51
community: Repair embeddings/llamacpp's embed_query method (#29935)
**Description:** As commented on the commit
[41b6a86](41b6a86bbe)
it introduced a bug for when we do an embedding request and the model
returns a non-nested list. Typically it's the case for model
**_nomic-embed-text_**.

- I added the unit test, and ran `make format`, `make lint` and `make
test` from the `community` package.
- No new dependency.

---------

Co-authored-by: Chester Curme <chester.curme@gmail.com>
2025-02-23 19:32:17 +00:00
..
__init__.py community: support Hunyuan Embedding (#23160) 2024-12-16 19:27:19 +00:00
aleph_alpha.py multiple: pydantic 2 compatibility, v0.3 (#26443) 2024-09-13 14:38:45 -07:00
anyscale.py community[patch]: fix errors introduced by pydantic 2.10 (#28297) 2024-11-22 17:50:13 -05:00
ascend.py community: Bump ruff version to 0.9 (#29206) 2025-02-08 01:21:10 +00:00
awa.py multiple: pydantic 2 compatibility, v0.3 (#26443) 2024-09-13 14:38:45 -07:00
azure_openai.py Community/Partner: Adding Azure community and partner user agent to better track usage in Python (#29561) 2025-02-07 23:28:30 +00:00
baichuan.py Improvement[Community]Improve Embeddings API (#28038) 2024-11-12 13:57:35 -05: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: Bump ruff version to 0.9 (#29206) 2025-02-08 01:21:10 +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 Improvement[Community]Improve Embeddings API (#28038) 2024-11-12 13:57:35 -05:00
databricks.py docs: Updating the imports for langchain-databricks to databricks-langchain (#29646) 2025-02-06 13:28:07 -08: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 Improvement[Community]Improve Embeddings API (#28038) 2024-11-12 13:57:35 -05:00
fastembed.py community: improve FastEmbedEmbeddings support for ONNX execution provider (e.g. GPU) (#29645) 2025-02-06 15:31:23 -05:00
gigachat.py community: Add deprecation warning for GigaChat integration in langchain-community (#28022) 2024-11-20 21:03:47 +00: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 community: Passing the model_kwargs correctly while maintaing backward compatability (#28439) 2024-12-15 20:34:29 +00:00
hunyuan.py community: support Hunyuan Embedding (#23160) 2024-12-16 19:27:19 +00: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 core,langchain,community[patch]: allow langsmith 0.2 (#28598) 2024-12-10 18:50:58 +00:00
llamacpp.py community: Repair embeddings/llamacpp's embed_query method (#29935) 2025-02-23 19:32:17 +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
model2vec.py community: fixed bug in model2vec embedding code (#28670) 2024-12-11 15:50:56 -08: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: Bump ruff version to 0.9 (#29206) 2025-02-08 01:21:10 +00:00
nemo.py community: Bump ruff version to 0.9 (#29206) 2025-02-08 01:21:10 +00:00
nlpcloud.py community[patch]: Fix missing protected_namespaces(). (#27610) 2024-10-25 02:16:26 +00:00
oci_generative_ai.py [oci_generative_ai] Option to pass auth_file_location (#29481) 2025-02-03 21:44:13 -05:00
octoai_embeddings.py community[patch]: fix errors introduced by pydantic 2.10 (#28297) 2024-11-22 17:50:13 -05: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 community: Bump ruff version to 0.9 (#29206) 2025-02-08 01:21:10 +00: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 community: Use new OVHcloud batch embedding (#26209) 2024-11-04 16:40:30 -05: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 libs: add sambanova-lagchain integration package (#29417) 2025-01-27 20:34:55 +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 partner: Update Upstage Model Names and Remove Deprecated Model (#29093) 2025-01-08 10:13:22 -05:00
spacy_embeddings.py community: Bump ruff version to 0.9 (#29206) 2025-02-08 01:21:10 +00: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