Skip to main content

Create embeddings using the Nomic API

Project description

llm-nomic-api-embed

PyPI Changelog Tests License

Create embeddings using the Nomic API

Installation

Install this plugin in the same environment as LLM.

llm install llm-nomic-api-embed

Usage

This plugin requires a Nomic API key. These include a generous free allowance for their embedding API.

Configure the key like this:

llm keys set nomic
# Paste key here

You can then use the Nomic embedding models like this:

llm embed -m nomic-1.5 -c 'hello world'

This will return a 768 item floating point array as JSON.

See the LLM embeddings documentation for more you can do with the tool.

Models

Run llm embed-models for a full list. The Nomic models are:

nomic-embed-text-v1 (aliases: nomic-1)
nomic-embed-text-v1.5 (aliases: nomic-1.5)
nomic-embed-text-v1.5-512 (aliases: nomic-1.5-512)
nomic-embed-text-v1.5-256 (aliases: nomic-1.5-256)
nomic-embed-text-v1.5-128 (aliases: nomic-1.5-128)
nomic-embed-text-v1.5-64 (aliases: nomic-1.5-64)
nomic-embed-vision-v1
nomic-embed-vision-v1.5

Vision models can be used with image files using the --binary option, for example:

llm embed-multi images --files . '*.png' \
  --binary --model nomic-embed-vision-v1.5

Development

To set up this plugin locally, first checkout the code. Then create a new virtual environment:

cd llm-nomic-api-embed
python3 -m venv venv
source venv/bin/activate

Now install the dependencies and test dependencies:

llm install -e '.[test]'

To run the tests:

pytest

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

llm_nomic_api_embed-0.2.tar.gz (7.6 kB view details)

Uploaded Source

Built Distribution

llm_nomic_api_embed-0.2-py3-none-any.whl (7.5 kB view details)

Uploaded Python 3

File details

Details for the file llm_nomic_api_embed-0.2.tar.gz.

File metadata

  • Download URL: llm_nomic_api_embed-0.2.tar.gz
  • Upload date:
  • Size: 7.6 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/5.1.1 CPython/3.12.7

File hashes

Hashes for llm_nomic_api_embed-0.2.tar.gz
Algorithm Hash digest
SHA256 65f5dba33733e5820fdc4d2b63e11c0c55180a3bc463547a7a00d720b374e2b1
MD5 4d8466e3fe6d848b9d50bf9c7314ae1c
BLAKE2b-256 f6570770d9b88f930f1fb9602e22c9eef864ce4de7188ae92d3ef63e9734de8a

See more details on using hashes here.

Provenance

The following attestation bundles were made for llm_nomic_api_embed-0.2.tar.gz:

Publisher: publish.yml on simonw/llm-nomic-api-embed

Attestations:

File details

Details for the file llm_nomic_api_embed-0.2-py3-none-any.whl.

File metadata

File hashes

Hashes for llm_nomic_api_embed-0.2-py3-none-any.whl
Algorithm Hash digest
SHA256 3e185cf54581b3078e121690dd4610877d2c90de82a773828214a8eae8b20259
MD5 c994e70cdc7e1a2248d8eaea4e788bdd
BLAKE2b-256 3dd552119725d6c7801d6eb77ce845b5da67fcd24fb8606b75a4eddebfe45fac

See more details on using hashes here.

Provenance

The following attestation bundles were made for llm_nomic_api_embed-0.2-py3-none-any.whl:

Publisher: publish.yml on simonw/llm-nomic-api-embed

Attestations:

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page