Home / Function/ aembed_documents() — langchain Function Reference

aembed_documents() — langchain Function Reference

Architecture documentation for the aembed_documents() function in embeddings.py from the langchain codebase.

Entity Profile

Dependency Diagram

graph TD
  6da257f1_8f04_1bab_2705_6a6c38ec8575["aembed_documents()"]
  0c74773d_9131_7802_d6df_f19bff9e4247["OllamaEmbeddings"]
  6da257f1_8f04_1bab_2705_6a6c38ec8575 -->|defined in| 0c74773d_9131_7802_d6df_f19bff9e4247
  889b8605_e993_3a76_573b_2207ae285cbe["aembed_query()"]
  889b8605_e993_3a76_573b_2207ae285cbe -->|calls| 6da257f1_8f04_1bab_2705_6a6c38ec8575
  style 6da257f1_8f04_1bab_2705_6a6c38ec8575 fill:#6366f1,stroke:#818cf8,color:#fff

Relationship Graph

Source Code

libs/partners/ollama/langchain_ollama/embeddings.py lines 313–328

    async def aembed_documents(self, texts: list[str]) -> list[list[float]]:
        """Embed search docs."""
        if not self._async_client:
            msg = (
                "Ollama client is not initialized. "
                "Please ensure Ollama is running and the model is loaded."
            )
            raise ValueError(msg)
        return (
            await self._async_client.embed(
                self.model,
                texts,
                options=self._default_params,
                keep_alive=self.keep_alive,
            )
        )["embeddings"]

Domain

Subdomains

Called By

Frequently Asked Questions

What does aembed_documents() do?
aembed_documents() is a function in the langchain codebase, defined in libs/partners/ollama/langchain_ollama/embeddings.py.
Where is aembed_documents() defined?
aembed_documents() is defined in libs/partners/ollama/langchain_ollama/embeddings.py at line 313.
What calls aembed_documents()?
aembed_documents() is called by 1 function(s): aembed_query.

Analyze Your Own Codebase

Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.

Try Supermodel Free