langchain/libs/partners/nomic
Jared Van Bortel 25d1c1c9bb
nomic: implement local embeddings with the inference_mode parameter (#21934)
## Description

This PR implements local and dynamic mode in the Nomic Embed integration
using the inference_mode and device parameters. They work as documented
[here](https://docs.nomic.ai/reference/python-api/embeddings#local-inference).

<!-- If no one reviews your PR within a few days, please @-mention one
of baskaryan, efriis, eyurtsev, hwchase17. -->

---------

Co-authored-by: Erick Friis <erickfriis@gmail.com>
2024-05-20 14:17:07 -07:00
..
langchain_nomic nomic: implement local embeddings with the inference_mode parameter (#21934) 2024-05-20 14:17:07 -07:00
scripts infra: add print rule to ruff (#16221) 2024-02-09 16:13:30 -08:00
tests nomic[patch]: release 0.0.2, dimensionality (#17534) 2024-02-14 08:38:07 -08:00
.gitignore nomic: init pkg (#16853) 2024-01-31 16:46:35 -08:00
LICENSE nomic: init pkg (#16853) 2024-01-31 16:46:35 -08:00
Makefile nomic: init pkg (#16853) 2024-01-31 16:46:35 -08:00
poetry.lock nomic: implement local embeddings with the inference_mode parameter (#21934) 2024-05-20 14:17:07 -07:00
pyproject.toml nomic: implement local embeddings with the inference_mode parameter (#21934) 2024-05-20 14:17:07 -07:00
README.md nomic: init pkg (#16853) 2024-01-31 16:46:35 -08:00

langchain-nomic

This package contains the LangChain integration with Nomic

Installation

pip install -U langchain-nomic

And you should configure credentials by setting the following environment variables:

  • NOMIC_API_KEY: your nomic API key

Embeddings

NomicEmbeddings class exposes embeddings from Nomic.

from langchain_nomic import NomicEmbeddings

embeddings = NomicEmbeddings()
embeddings.embed_query("What is the meaning of life?")