HexdocsMcp.Embeddings (HexDocs MCP v0.1.1)
View SourceFunctions for generating embeddings from markdown chunks using Ollama.
Summary
Functions
Generate embeddings for all chunks in a package and store them in SQLite.
Search for similar text in embeddings using SQLite.
Functions
Generate embeddings for all chunks in a package and store them in SQLite.
Parameters
package- The name of the packageversion- The version of the package or "latest"model- The Ollama model to use, "nomic-embed-text" is recommendedprogress_callback- (Optional) Function called with progress updates
Returns
{:ok, count}- The number of embeddings generated
Search for similar text in embeddings using SQLite.
Parameters
query- The search querypackage- The name of the package to search inversion- The version of the package or "latest"model- The Ollama model to use, "nomic-embed-text" is recommendedtop_k- (Optional) Number of results to return, defaults to 3progress_callback- (Optional) Function called with progress updates