RAGComponentFactoryImpl

gitinsp.infrastructure.factories.RAGComponentFactoryImpl
class RAGComponentFactoryImpl(config: Config) extends RAGComponentFactory, LazyLogging

Default implementation of RAGComponentFactory that creates components based on configuration.

Value parameters

config

The application configuration

Attributes

Graph
Supertypes
trait LazyLogging
class Object
trait Matchable
class Any

Members list

Value members

Concrete methods

override def createAssistant(chatModel: StreamingChatLanguageModel, retrievalAugmentor: Option[RetrievalAugmentor]): Assistant

Creates an assistant. It is used to chat with the model. The retrieval augmentor is optional as it will not be used when no retrieval is required (when chatting without an index).

Creates an assistant. It is used to chat with the model. The retrieval augmentor is optional as it will not be used when no retrieval is required (when chatting without an index).

Value parameters

chatModel

The chat model

retrievalAugmentor

The retrieval augmentor.

Attributes

Returns

A streaming assistant

Definition Classes
override def createCodeEmbeddingModel(): OllamaEmbeddingModel

Creates an embedding model optimized for code.

Creates an embedding model optimized for code.

Attributes

Returns

An OllamaEmbeddingModel

Definition Classes
override def createCodeRetriever(embeddingStore: QdrantEmbeddingStore, embeddingModel: OllamaEmbeddingModel, indexName: String, modelRouter: OllamaChatModel): EmbeddingStoreContentRetriever

Creates a retriever for code.

Creates a retriever for code.

Value parameters

embeddingModel

The embedding model

embeddingStore

The embedding store

indexName

The specific collection to be used

modelRouter

The LLM router used for dynamic filtering

Attributes

Returns

A retriever for the specified index

Definition Classes
override def createCollection(name: String, client: QdrantClient, distance: Distance): Try[Unit]

Creates a collection in Qdrant.

Creates a collection in Qdrant.

Value parameters

name

The name of the collection

Attributes

Definition Classes
override def createContentAggregator(scoringModel: ScoringModel): ReRankingContentAggregator

Creates a content aggregator for ranking and filtering retrieved content. This allows to rerank results, potentially yielding more relevant content.

Creates a content aggregator for ranking and filtering retrieved content. This allows to rerank results, potentially yielding more relevant content.

Value parameters

scoringModel

The scoring model used to rank retrieved content

Attributes

Returns

A configured ReRankingContentAggregator

Definition Classes
override def createEmbeddingStore(client: QdrantClient, name: String): QdrantEmbeddingStore

Creates an embedding store. It is used to store documents in a vector database.

Creates an embedding store. It is used to store documents in a vector database.

Value parameters

client

The Qdrant client

name

The name of the collection

Attributes

Returns

A QdrantEmbeddingStore

Definition Classes
override def createIngestor(language: Language, embeddingModel: OllamaEmbeddingModel, embeddingStore: QdrantEmbeddingStore, strategy: IngestionStrategy): EmbeddingStoreIngestor

Creates an ingestor given a repository.

Creates an ingestor given a repository.

Attributes

Returns

An EmbeddingStoreIngestor

Definition Classes
override def createMarkdownRetriever(embeddingStore: QdrantEmbeddingStore, embeddingModel: OllamaEmbeddingModel, indexName: String): EmbeddingStoreContentRetriever

Creates a retriever for the specified index.

Creates a retriever for the specified index.

Value parameters

embeddingModel

The embedding model

embeddingStore

The embedding store

indexName

The specific collection to be used

Attributes

Returns

A retriever for the specified index

Definition Classes
override def createModelRouter(): OllamaChatModel

Creates a content aggregator using the reranker configuration.

Creates a content aggregator using the reranker configuration.

Attributes

Returns

A ReRankingContentAggregator

Definition Classes
override def createQdrantClient(): QdrantClient

Creates a Qdrant client.

Creates a Qdrant client.

Attributes

Returns

A QdrantClient

Definition Classes
override def createQueryRouter(retrievers: List[EmbeddingStoreContentRetriever], modelRouter: OllamaChatModel): QueryRouter

Creates a query router based on configuration and available routing strategies.

Creates a query router based on configuration and available routing strategies.

Value parameters

retrievers

The list of content retrievers

Attributes

Returns

A QueryRouter

Definition Classes
override def createRetrievalAugmentor(router: QueryRouter, aggregator: ReRankingContentAggregator): DefaultRetrievalAugmentor

Creates a retrieval augmentor that combines the router and aggregator.

Creates a retrieval augmentor that combines the router and aggregator.

Value parameters

aggregator

The content aggregator

router

The query router

Attributes

Returns

A DefaultRetrievalAugmentor

Definition Classes
override def createScoringModel(): ScoringModel

Creates a scoring model. It is used to rerank documents (potentially yield better results).

Creates a scoring model. It is used to rerank documents (potentially yield better results).

Attributes

Returns

A ScoringModel

Definition Classes
override def createStreamingChatModel(): StreamingChatLanguageModel

Creates a streaming chat model.

Creates a streaming chat model.

Attributes

Returns

A streaming chat model implementation

Definition Classes
override def createTextEmbeddingModel(): OllamaEmbeddingModel

Creates an embedding model optimized for the specified language.

Creates an embedding model optimized for the specified language.

Value parameters

language

The language to optimize for

Attributes

Returns

An OllamaEmbeddingModel

Definition Classes

Inherited fields

lazy protected val logger: Logger

Attributes

Inherited from:
LazyLogging