Home / File/ embeddings.py — langchain Source File

embeddings.py — langchain Source File

Architecture documentation for embeddings.py, a python file in the langchain codebase. 4 imports, 0 dependents.

Entity Profile

Dependency Diagram

graph LR
  c3d15cb2_f724_6cc6_1e3f_35f69bda1eea["embeddings.py"]
  9e98f0a7_ec6e_708f_4f1b_e9428b316e1c["os"]
  c3d15cb2_f724_6cc6_1e3f_35f69bda1eea --> 9e98f0a7_ec6e_708f_4f1b_e9428b316e1c
  8e2034b7_ceb8_963f_29fc_2ea6b50ef9b3["typing"]
  c3d15cb2_f724_6cc6_1e3f_35f69bda1eea --> 8e2034b7_ceb8_963f_29fc_2ea6b50ef9b3
  c5592576_c65f_234e_780b_1a759458dc8d["nomic"]
  c3d15cb2_f724_6cc6_1e3f_35f69bda1eea --> c5592576_c65f_234e_780b_1a759458dc8d
  bc46b61d_cfdf_3f6b_a9dd_ac2a328d84b3["langchain_core.embeddings"]
  c3d15cb2_f724_6cc6_1e3f_35f69bda1eea --> bc46b61d_cfdf_3f6b_a9dd_ac2a328d84b3
  style c3d15cb2_f724_6cc6_1e3f_35f69bda1eea fill:#6366f1,stroke:#818cf8,color:#fff

Relationship Graph

Source Code

"""Nomic partner integration for LangChain."""

from __future__ import annotations

import os
from typing import Literal, overload

import nomic  # type: ignore[import]
from langchain_core.embeddings import Embeddings
from nomic import embed


class NomicEmbeddings(Embeddings):
    """`NomicEmbeddings` embedding model.

    Example:
        ```python
        from langchain_nomic import NomicEmbeddings

        model = NomicEmbeddings()
        ```
    """

    @overload
    def __init__(
        self,
        *,
        model: str,
        nomic_api_key: str | None = ...,
        dimensionality: int | None = ...,
        inference_mode: Literal["remote"] = ...,
    ) -> None: ...

    @overload
    def __init__(
        self,
        *,
        model: str,
        nomic_api_key: str | None = ...,
        dimensionality: int | None = ...,
        inference_mode: Literal["local", "dynamic"],
        device: str | None = ...,
    ) -> None: ...

    @overload
    def __init__(
        self,
        *,
        model: str,
        nomic_api_key: str | None = ...,
        dimensionality: int | None = ...,
        inference_mode: str,
        device: str | None = ...,
    ) -> None: ...

    def __init__(
        self,
        *,
        model: str,
        nomic_api_key: str | None = None,
// ... (90 more lines)

Subdomains

Classes

Dependencies

  • langchain_core.embeddings
  • nomic
  • os
  • typing

Frequently Asked Questions

What does embeddings.py do?
embeddings.py is a source file in the langchain codebase, written in python. It belongs to the CoreAbstractions domain, RunnableInterface subdomain.
What does embeddings.py depend on?
embeddings.py imports 4 module(s): langchain_core.embeddings, nomic, os, typing.
Where is embeddings.py in the architecture?
embeddings.py is located at libs/partners/nomic/langchain_nomic/embeddings.py (domain: CoreAbstractions, subdomain: RunnableInterface, directory: libs/partners/nomic/langchain_nomic).

Analyze Your Own Codebase

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

Try Supermodel Free