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
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
bedrock.py community[patch]: Add explicit error message to Bedrock error output. (#17328) 2024-03-29 03:07:33 +00:00
bookend.py
clarifai.py community[patch] : Tidy up and update Clarifai SDK functions (#18314) 2024-03-07 19:47:44 -08:00
cloudflare_workersai.py
cohere.py cohere[patch]: add cohere as a partner package (#19049) 2024-03-25 20:23:47 +00:00
dashscope.py
databricks.py community[patch]: docstrings update (#20301) 2024-04-11 16:23:27 -04:00
deepinfra.py
edenai.py
elasticsearch.py elasticsearch[patch], community[patch]: update references, deprecate community classes (#18506) 2024-03-06 15:09:12 -08:00
embaas.py
ernie.py
fake.py
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
gpt4all.py
gradient_ai.py
huggingface_hub.py
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
johnsnowlabs.py
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
localai.py
minimax.py
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
mosaicml.py
nemo.py community[patch]: docstrings update (#20301) 2024-04-11 16:23:27 -04:00
nlpcloud.py
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
self_hosted.py
sentence_transformer.py
solar.py community[minor]: Add solar embedding (#19761) 2024-03-29 09:36:05 -07:00
spacy_embeddings.py
sparkllm.py community[patch]: Fix sparkllm embeddings api bug. (#19122) 2024-03-15 15:08:49 -07:00
tensorflow_hub.py
text2vec.py Update text2vec.py (#19657) 2024-03-27 13:13:30 -04:00
vertexai.py
volcengine.py
voyageai.py voyageai[patch]: init package (#19098) 2024-03-15 00:56:10 +00:00
xinference.py
yandex.py community[patch]: Fix YandexGPT embeddings (#19720) 2024-04-13 16:23:01 -07:00