mirror of
https://github.com/langchain-ai/langchain-pinecone.git
synced 2026-07-19 13:54:50 -04:00
fix/aembed-query-params
The async `aembed_query` was passing `self.document_params` (input_type: "passage") to `_aembed_texts` while the sync `embed_query` correctly passes `self.query_params` (input_type: "query"). This caused async query embeddings to be embedded as passages, which degrades retrieval quality for async callers. Change `parameters=self.document_params` to `parameters=self.query_params` in `PineconeEmbeddings.aembed_query` (one line). The sparse twin `PineconeSparseEmbeddings.aembed_query` already used `query_params` correctly. Add three regression tests in `TestQueryParamsParity`: - `test_embed_query_uses_query_params` — pins the sync contract - `test_aembed_query_uses_query_params` — fails before the fix, passes after - `test_sparse_aembed_query_uses_query_params` — pins the sparse async contract
🦜️🔗 LangChain Pinecone
This repository contains 1 package with Pinecone integrations with LangChain:
Releases
10
Languages
Python
99.1%
Makefile
0.8%
Shell
0.1%