{"id":14964968,"url":"https://github.com/sukhbinder/llm-embed-ollama","last_synced_at":"2026-01-20T08:06:45.176Z","repository":{"id":250279625,"uuid":"834000134","full_name":"sukhbinder/llm-embed-ollama","owner":"sukhbinder","description":"Ollama provides Few embedding models. This plugin enables the usage of those models using Ollama.","archived":false,"fork":false,"pushed_at":"2024-08-08T08:00:58.000Z","size":46,"stargazers_count":10,"open_issues_count":1,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-12-29T22:00:51.225Z","etag":null,"topics":["cli","embedding","llm","llm-plugin","ollama"],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/sukhbinder.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2024-07-26T08:02:11.000Z","updated_at":"2025-06-27T18:59:49.000Z","dependencies_parsed_at":"2024-07-26T09:26:31.189Z","dependency_job_id":"16f2d051-8147-423a-8c83-f97d3f82d600","html_url":"https://github.com/sukhbinder/llm-embed-ollama","commit_stats":{"total_commits":23,"total_committers":1,"mean_commits":23.0,"dds":0.0,"last_synced_commit":"918d3d5f65d61e7f3d73284a4b10b6ac3ce6db5c"},"previous_names":["sukhbinder/llm-embed-ollama"],"tags_count":5,"template":false,"template_full_name":null,"purl":"pkg:github/sukhbinder/llm-embed-ollama","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sukhbinder%2Fllm-embed-ollama","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sukhbinder%2Fllm-embed-ollama/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sukhbinder%2Fllm-embed-ollama/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sukhbinder%2Fllm-embed-ollama/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/sukhbinder","download_url":"https://codeload.github.com/sukhbinder/llm-embed-ollama/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sukhbinder%2Fllm-embed-ollama/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28598875,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-01-20T02:08:49.799Z","status":"ssl_error","status_checked_at":"2026-01-20T02:08:44.148Z","response_time":117,"last_error":"SSL_read: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["cli","embedding","llm","llm-plugin","ollama"],"created_at":"2024-09-24T13:34:02.565Z","updated_at":"2026-01-20T08:06:45.170Z","avatar_url":"https://github.com/sukhbinder.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# llm-embed-ollama\n\n[![PyPI](https://img.shields.io/pypi/v/llm-embed-ollama.svg)](https://pypi.org/project/llm-embed-ollama/)\n[![Changelog](https://img.shields.io/github/v/release/sukhbinder/llm-embed-ollama?include_prereleases\u0026label=changelog)](https://github.com/sukhbinder/llm-embed-ollama/releases)\n[![Tests](https://github.com/sukhbinder/llm-embed-ollama/workflows/Test/badge.svg)](https://github.com/sukhbinder/llm-embed-ollama/actions?query=workflow%3ATest)\n[![License](https://img.shields.io/badge/license-Apache%202.0-blue.svg)](https://github.com/sukhbinder/llm-embed-ollama/blob/main/LICENSE)\n\n[LLM](https://llm.datasette.io/) plugin providing access to embedding models running on local [Ollama](https://ollama.ai) server.\n\n\n## Installation\n\nInstall this plugin in the same environment as [LLM](https://llm.datasette.io/).\n\n    llm install llm-embed-ollama\n\n## Background\n\nOllama provides Few embedding models. This plugin enables the usage of those models using llm and ollama embeddings..\n\nTo utilize these models, you need to have an instance of the Ollama server running.\n\nSee also [Embeddings: What they are and why they matter](https://simonillison.net/2023/Oct/23/embeddings/) for background on embeddings and an explanation of the LLM embeddings tool.\n\nSee also [Ollama Embeddings Models Blog](https://ollama.com/blog/embedding-models)\n\n\n## Usage\n\nThis plugin adds support for the following embedding models available in ollama:\n\n- all-minilm\n- nomic-embed-text\n- mxbai-embed-large\n- bge-large: Embedding model from BAAI mapping texts to vectors.\n- bge-m3: BGE-M3 is a new model from BAAI distinguished for its versatility in Multi-Functionality, Multi-Linguality, and Multi-Granularity.\n\nThe models needs to be downloaded. Using `ollama pull \u003cmodel-name\u003e the first time you try to use them.\n\nSee [the LLM documentation](https://llm.datasette.io/en/stable/embeddings/index.html) for everything you can do.\n\nTo get started embedding a single string, run the following:\n\nMake sure you have the appropriate ollama model.\n\n```bash\nollama pull all-minilm\n```\n\n```bash\nllm embed -m all-minilm -c 'Hello world'\n```\nThis will output a JSON array of 384 floating point numbers to your terminal.\n\nTo calculate and store embeddings for every README in the current directory (try this somewhere with a `node_modules` directory to get lots of READMEs) run this:\n\n```bash\nllm embed-multi ollama-readmes \\\n    -m all-minilm \\\n    --files . '**/README.md' --store\n```\n\nThen you can run searches against them like this:\n\n```bash\nllm similar ollama-readmes -c 'utility functions'\n```\nAdd `| jq` to pipe it through [jq](https://jqlang.github.io/jq/) for pretty-printed output, or ` | jq .id` to just see the matching filenames.\n\n### Prefix and suffix support\n\nSome embedding models expect prefixed or suffixed input (for example, instruction-style or query embeddings).\n\nThis plugin supports optional embedding prefixes and suffixes provided by `llm`. When a prefix or suffix is set on the embedding model, it is automatically applied before generating embeddings.\n\nExample (Python):\n\n```python\nimport llm\n\nmodel = llm.get_embedding_model(\"all-minilm\")\nmodel.prefix = \"query: \"\n\nembedding = model.embed(\"hello world\")\n```\nThis is useful for models that distinguish between query and document embeddings.\n\n\n## Development\n\nTo set up this plugin locally, first checkout the code. Then create a new virtual environment:\n\n```bash\ncd llm-embed-ollama\npython3 -m venv venv\nsource venv/bin/activate\n```\n\nNow install the dependencies and test dependencies:\n\n```bash\nllm install -e '.[test]'\n```\n\nTo run the tests:\n```bash\npytest\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsukhbinder%2Fllm-embed-ollama","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fsukhbinder%2Fllm-embed-ollama","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsukhbinder%2Fllm-embed-ollama/lists"}