View Source Search (fnord v0.4.18)

This module provides the functionality for the search sub-command.

Summary

Functions

Creates a new Search struct with the given options.

Searches the given project for previously indexed files (see Indexing) that match the given query. The search results are printed to the console.

Functions

Link to this function

cosine_similarity(vec1, vec2)

View Source
Link to this function

new(opts, ai_module \\ AI)

View Source

Creates a new Search struct with the given options.

Link to this function

run(opts, ai_module \\ AI)

View Source

Searches the given project for previously indexed files (see Indexing) that match the given query. The search results are printed to the console.

Note that the query input is first sent to OpenAI's API to generate an embedding to match against the vector store.