langchain/libs/community/langchain_community/embeddings
Egor Krasheninnikov c8391d4ff1
community[patch]: Fix YandexGPT embeddings (#19720)
Fix of YandexGPT embeddings. 

The current version uses a single `model_name` for queries and
documents, essentially making the `embed_documents` and `embed_query`
methods the same. Yandex has a different endpoint (`model_uri`) for
encoding documents, see
[this](https://yandex.cloud/en/docs/yandexgpt/concepts/embeddings). The
bug may impact retrievers built with `YandexGPTEmbeddings` (for instance
FAISS database as retriever) since they use both `embed_documents` and
`embed_query`.

A simple snippet to test the behaviour:
```python
from langchain_community.embeddings.yandex import YandexGPTEmbeddings
embeddings = YandexGPTEmbeddings()
q_emb = embeddings.embed_query('hello world')
doc_emb = embeddings.embed_documents(['hello world', 'hello world'])
q_emb == doc_emb[0]
```
The response is `True` with the current version and `False` with the
changes I made.


Twitter: @egor_krash

---------

Co-authored-by: Bagatur <22008038+baskaryan@users.noreply.github.com>
Co-authored-by: Bagatur <baskaryan@gmail.com>
2024-04-13 16:23:01 -07:00
..
__init__.py community[patch]: import flattening fix (#20110) 2024-04-10 13:01:19 -04:00
aleph_alpha.py community[patch]: docstrings update (#20301) 2024-04-11 16:23:27 -04:00
anyscale.py community[minor]: Add Anyscale embedding support (#17605) 2024-03-29 00:53:53 +00:00
awa.py community[major], core[patch], langchain[patch], experimental[patch]: Create langchain-community (#14463) 2023-12-11 13:53:30 -08:00
azure_openai.py multiple[patch]: fix deprecation versions (#18349) 2024-02-29 16:58:33 -08:00
baichuan.py infra: add print rule to ruff (#16221) 2024-02-09 16:13:30 -08:00
baidu_qianfan_endpoint.py community:qianfan endpoint support init params & remove useless params definietion (#15381) 2024-01-01 13:12:31 -08:00
bedrock.py community[patch]: Add explicit error message to Bedrock error output. (#17328) 2024-03-29 03:07:33 +00:00
bookend.py community[major], core[patch], langchain[patch], experimental[patch]: Create langchain-community (#14463) 2023-12-11 13:53:30 -08:00
clarifai.py community[patch] : Tidy up and update Clarifai SDK functions (#18314) 2024-03-07 19:47:44 -08:00
cloudflare_workersai.py community[major], core[patch], langchain[patch], experimental[patch]: Create langchain-community (#14463) 2023-12-11 13:53:30 -08:00
cohere.py cohere[patch]: add cohere as a partner package (#19049) 2024-03-25 20:23:47 +00:00
dashscope.py Fixing the Issue with DashScopeEmbeddings Handling More than 25 Rows of Data (#14662) 2024-01-01 16:50:13 -08:00
databricks.py community[patch]: docstrings update (#20301) 2024-04-11 16:23:27 -04:00
deepinfra.py community[major], core[patch], langchain[patch], experimental[patch]: Create langchain-community (#14463) 2023-12-11 13:53:30 -08:00
edenai.py infra: add -p to mkdir in lint steps (#17013) 2024-02-05 11:22:06 -08:00
elasticsearch.py elasticsearch[patch], community[patch]: update references, deprecate community classes (#18506) 2024-03-06 15:09:12 -08:00
embaas.py infra: add -p to mkdir in lint steps (#17013) 2024-02-05 11:22:06 -08:00
ernie.py community[patch]: deprecate ErnieBotChat and ErnieEmbeddings classes (#15862) 2024-01-15 11:14:44 -08:00
fake.py community[major], core[patch], langchain[patch], experimental[patch]: Create langchain-community (#14463) 2023-12-11 13:53:30 -08:00
fastembed.py community[patch]: support fastembed v1 and v2 (#19125) 2024-03-15 18:33:51 -07:00
gigachat.py community[minor]: Added GigaChat Embeddings support + updated previous GigaChat integration (#19516) 2024-03-25 16:08:37 -07:00
google_palm.py community[major], core[patch], langchain[patch], experimental[patch]: Create langchain-community (#14463) 2023-12-11 13:53:30 -08:00
gpt4all.py community[major], core[patch], langchain[patch], experimental[patch]: Create langchain-community (#14463) 2023-12-11 13:53:30 -08:00
gradient_ai.py infra: add -p to mkdir in lint steps (#17013) 2024-02-05 11:22:06 -08:00
huggingface_hub.py community[patch]: Fixed 'coroutine' object is not subscriptable error (#15986) 2024-01-15 10:34:10 -08:00
huggingface.py docs: HFEmbeddings: Add more information to model_kwargs/encode_kwargs (#19594) 2024-03-26 12:46:04 -04:00
infinity_local.py community[patch]: docstrings update (#20301) 2024-04-11 16:23:27 -04:00
infinity.py community[patch]: infinity embeddings update incorrect default url (#16759) 2024-02-12 20:05:08 -08:00
itrex.py community[minor]: Add ITREX optimized Embeddings (#18474) 2024-03-27 07:22:06 +00:00
javelin_ai_gateway.py community[patch]: docstrings update (#20301) 2024-04-11 16:23:27 -04:00
jina.py Refactor: use SecretStr for jina embeddings (#15068) 2023-12-22 11:42:29 -08:00
johnsnowlabs.py community[major], core[patch], langchain[patch], experimental[patch]: Create langchain-community (#14463) 2023-12-11 13:53:30 -08:00
laser.py community: Add Laser Embedding Integration (#18111) 2024-02-26 12:16:37 -08:00
llamacpp.py community[patch]: llama cpp embeddings reset default n_batch (#17594) 2024-03-29 00:47:22 +00:00
llamafile.py community[minor]: llamafile embeddings support (#17976) 2024-03-01 13:49:18 -08:00
llm_rails.py infra: add -p to mkdir in lint steps (#17013) 2024-02-05 11:22:06 -08:00
localai.py community[major], core[patch], langchain[patch], experimental[patch]: Create langchain-community (#14463) 2023-12-11 13:53:30 -08:00
minimax.py infra: add -p to mkdir in lint steps (#17013) 2024-02-05 11:22:06 -08:00
mlflow_gateway.py community[patch]: docstrings update (#20301) 2024-04-11 16:23:27 -04:00
mlflow.py docs: fix databricks document url (#19096) 2024-03-15 22:25:11 +00:00
modelscope_hub.py community[major], core[patch], langchain[patch], experimental[patch]: Create langchain-community (#14463) 2023-12-11 13:53:30 -08:00
mosaicml.py community[major], core[patch], langchain[patch], experimental[patch]: Create langchain-community (#14463) 2023-12-11 13:53:30 -08:00
nemo.py community[patch]: docstrings update (#20301) 2024-04-11 16:23:27 -04:00
nlpcloud.py community[major], core[patch], langchain[patch], experimental[patch]: Create langchain-community (#14463) 2023-12-11 13:53:30 -08:00
oci_generative_ai.py community[patch]: docstrings (#16810) 2024-02-09 12:48:57 -08:00
octoai_embeddings.py community[patch]: octoai embeddings bug fix (#17216) 2024-02-07 22:25:52 -05:00
ollama.py community[patch]: OllamaEmbeddings - Pass headers to post request (#16880) 2024-03-29 18:44:52 +00:00
openai.py multiple[patch]: fix deprecation versions (#18349) 2024-02-29 16:58:33 -08:00
openvino.py community[minor]: Add OpenVINO rerank model support (#19791) 2024-04-01 18:27:23 +00:00
optimum_intel.py community[minor]: Add QuantizedEmbedders (#17391) 2024-02-15 11:01:24 -08:00
premai.py community[minor]: Prem AI langchain integration (#19113) 2024-03-26 01:37:19 +00:00
sagemaker_endpoint.py community[patch]: Add explicit error message to Bedrock error output. (#17328) 2024-03-29 03:07:33 +00:00
self_hosted_hugging_face.py docs: Update documentation to use 'model_id' rather than 'model_name' to match actual API (#16615) 2024-01-26 15:01:12 -08:00
self_hosted.py community[major], core[patch], langchain[patch], experimental[patch]: Create langchain-community (#14463) 2023-12-11 13:53:30 -08:00
sentence_transformer.py community[major], core[patch], langchain[patch], experimental[patch]: Create langchain-community (#14463) 2023-12-11 13:53:30 -08:00
solar.py community[minor]: Add solar embedding (#19761) 2024-03-29 09:36:05 -07:00
spacy_embeddings.py infra: add -p to mkdir in lint steps (#17013) 2024-02-05 11:22:06 -08:00
sparkllm.py community[patch]: Fix sparkllm embeddings api bug. (#19122) 2024-03-15 15:08:49 -07:00
tensorflow_hub.py community[major], core[patch], langchain[patch], experimental[patch]: Create langchain-community (#14463) 2023-12-11 13:53:30 -08:00
text2vec.py Update text2vec.py (#19657) 2024-03-27 13:13:30 -04:00
vertexai.py Adds progress bar to VertexAIEmbeddings (#14542) 2024-01-24 11:16:16 -07:00
volcengine.py Feat add volcano embedding (#14693) 2024-01-01 14:37:35 -08:00
voyageai.py voyageai[patch]: init package (#19098) 2024-03-15 00:56:10 +00:00
xinference.py community[major], core[patch], langchain[patch], experimental[patch]: Create langchain-community (#14463) 2023-12-11 13:53:30 -08:00
yandex.py community[patch]: Fix YandexGPT embeddings (#19720) 2024-04-13 16:23:01 -07:00