CacheService

gitinsp.domain.interfaces.infrastructure.CacheService
trait CacheService extends LazyLogging

Service for managing vector database collections and AI services Provides caching and lifecycle management for RAG components

Attributes

Graph
Supertypes
trait LazyLogging
class Object
trait Matchable
class Any

Members list

Value members

Abstract methods

def createCollection(name: String, distance: Distance): Try[Unit]

Creates a new collection in the vector database

Creates a new collection in the vector database

Value parameters

distance

The distance metric to use for similarity calculations

name

The name of the collection to create

Attributes

Returns

A Try indicating success or failure of the operation

def delete(index: QdrantURL): Try[Unit]

Core implementation of collection deletion

Core implementation of collection deletion

Value parameters

index

The URL of the collection to delete

Attributes

Returns

A Try indicating success or failure of the deletion

def deleteAIService(indexName: AIServiceURL): Try[Unit]

Removes an AI service from the cache

Removes an AI service from the cache

Value parameters

indexName

The URL of the AI service to delete

Attributes

Returns

A Try indicating success or failure of the deletion

def deleteCollection(indexName: QdrantURL): Try[Unit]

Deletes a collection from the vector database

Deletes a collection from the vector database

Value parameters

indexName

The URL of the collection to delete

Attributes

Returns

A Try indicating success or failure of the deletion

The RAG component factory used to create various components

The RAG component factory used to create various components

Attributes

Returns

The configured RAGComponentFactory instance

def getAIService(index: AIServiceURL): Try[Assistant]

Retrieves an AI service by its index URL

Retrieves an AI service by its index URL

Value parameters

index

The URL identifying the AI service

Attributes

Returns

The requested Assistant wrapped in a Try

def getIngestor(index: QdrantURL, language: Language, strategy: IngestionStrategy): EmbeddingStoreIngestor

Creates an ingestor for adding documents to the vector database

Creates an ingestor for adding documents to the vector database

Value parameters

index

The target Qdrant index URL

language

The programming language of the content

strategy

Strategy for processing and ingesting documents

Attributes

Returns

An EmbeddingStoreIngestor configured for the specified parameters

Initializes or retrieves an AI service for a repository

Initializes or retrieves an AI service for a repository

Value parameters

repository

Optional repository with categories to create services for

Attributes

Returns

An initialized Assistant ready for interaction

def listCollections(): Try[List[String]]

Lists all available collections in the vector database

Lists all available collections in the vector database

Attributes

Returns

A list of collection names wrapped in a Try

def qdrantClient: QdrantClient

The Qdrant vector database client used for storing embeddings

The Qdrant vector database client used for storing embeddings

Attributes

Returns

A configured QdrantClient instance

Inherited fields

lazy protected val logger: Logger

Attributes

Inherited from:
LazyLogging