Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func NewEmbeddingStoreModel ¶
func NewEmbeddingStoreModel() contracts.IEmbeddingStore
NewEmbeddingStoreModel initializes a new CodeEmbeddingStoreModel.
Types ¶
type EmbeddingStore ¶
type EmbeddingStore struct {
EmbeddingsStore map[string][]float64
CodeStore map[string]string
// contains filtered or unexported fields
}
EmbeddingStore holds the embeddings and their corresponding code chunks.
func (*EmbeddingStore) CosineSimilarity ¶
func (store *EmbeddingStore) CosineSimilarity(vec1, vec2 []float64) float64
func (*EmbeddingStore) FindRelevantChunks ¶
func (store *EmbeddingStore) FindRelevantChunks(queryEmbedding []float64, topN int, threshold float64) []string
FindRelevantChunks retrieves the relevant code chunks from the embedding store based on a similarity threshold.
Click to show internal directories.
Click to hide internal directories.