_aembed_texts() — langchain Function Reference
Architecture documentation for the _aembed_texts() function in vectorstores.py from the langchain codebase.
Entity Profile
Dependency Diagram
graph TD b81b33c0_c789_80eb_7445_6fda6aa905e0["_aembed_texts()"] bf62db79_4217_463c_798f_6f8528ed0d6e["Qdrant"] b81b33c0_c789_80eb_7445_6fda6aa905e0 -->|defined in| bf62db79_4217_463c_798f_6f8528ed0d6e 7268a9dd_664a_8cff_f4f9_a345b28dafd3["_agenerate_rest_batches()"] 7268a9dd_664a_8cff_f4f9_a345b28dafd3 -->|calls| b81b33c0_c789_80eb_7445_6fda6aa905e0 style b81b33c0_c789_80eb_7445_6fda6aa905e0 fill:#6366f1,stroke:#818cf8,color:#fff
Relationship Graph
Source Code
libs/partners/qdrant/langchain_qdrant/vectorstores.py lines 2168–2195
async def _aembed_texts(self, texts: Iterable[str]) -> list[list[float]]:
"""Embed search texts.
Used to provide backward compatibility with `embedding_function` argument.
Args:
texts: Iterable of texts to embed.
Returns:
List of floats representing the texts embedding.
"""
if self.embeddings is not None:
embeddings = await self.embeddings.aembed_documents(list(texts))
if hasattr(embeddings, "tolist"):
embeddings = embeddings.tolist()
elif self._embeddings_function is not None:
embeddings = []
for text in texts:
embedding = self._embeddings_function(text)
if hasattr(embeddings, "tolist"):
embedding = embedding.tolist()
embeddings.append(embedding)
else:
msg = "Neither of embeddings or embedding_function is set"
raise ValueError(msg)
return embeddings
Domain
Subdomains
Called By
Source
Frequently Asked Questions
What does _aembed_texts() do?
_aembed_texts() is a function in the langchain codebase, defined in libs/partners/qdrant/langchain_qdrant/vectorstores.py.
Where is _aembed_texts() defined?
_aembed_texts() is defined in libs/partners/qdrant/langchain_qdrant/vectorstores.py at line 2168.
What calls _aembed_texts()?
_aembed_texts() is called by 1 function(s): _agenerate_rest_batches.
Analyze Your Own Codebase
Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.
Try Supermodel Free