Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ( ErrNilEmbedder = errors.New("embedder cannot be nil") ErrEmptyCollection = errors.New("qdrant collection name cannot be empty") ErrEmptyVectorSize = errors.New("vector size must be greater than zero") ErrEmptyQdrantURL = errors.New("qdrant URL cannot be empty") ErrEmptyEmbeddingVector = errors.New("embedder returned an empty vector") )
Functions ¶
func NewQdrant ¶
func NewQdrant( rawURL, apiKey, collection string, embedder embeddings.Embedder, ) (vectorstores.VectorStore, error)
NewQdrant creates a ready-to-use Qdrant vector store.
func ProbeEmbeddingSize ¶
func ProbeEmbeddingSize(ctx context.Context, embedder embeddings.Embedder, chunks []models.KnowledgeChunk) (int, error)
ProbeEmbeddingSize returns the vector dimension produced by the embedder, using the first non-empty chunk content as the sample text.
Types ¶
type BootstrapResult ¶
BootstrapResult holds the outcome of preparing a Qdrant collection.
func PrepareCollection ¶
func PrepareCollection( ctx context.Context, rawURL, apiKey, collection string, vectorSize int, reIndexOnBoot bool, ) (BootstrapResult, error)
PrepareCollection ensures the Qdrant collection exists and is ready for indexing. If reIndexOnBoot is true, any existing collection is deleted and recreated.
Click to show internal directories.
Click to hide internal directories.